Spring Boot 2.0 Web Applications

Spring Boot 2.0 Web Applications

The new generation of Spring Boot applications is here! With Spring Boot 2.0, developers can use the new Spring WebFlux reactive web framework.

During this live coding session, Stéphane and Brian will create a WebFlux application and leverage Boot features such as Actuator, Developer Tools and more.

Spring Boot 2.0 comes with many improvements and new features - Spring WebFlux allows reactive web endpoints and new HTTP runtimes such as Netty. This comes into two variants: a familiar annotation based approach similar to MVC and a new functional variant called "WebFlux.fn".

With 2.0, the Spring team leverages WebFlux with the "convention over configuration" flavour that made Boot so popular:

* auto-configuration of your web application
* customizing your app with configuration properties and callback-based interfaces
* Actuators and Developer Tools support
* leveraging the Spring ecosystem such as Spring Data and Spring Security

D3c309254575cdef66812b8970230d2c?s=128

Stéphane Nicoll

November 09, 2017
Tweet

Transcript

  1. Spring Boot 2.0 Web Applications Stéphane Nicoll - @snicoll Brian

    Clozel - @bclozel
  2. Spring Framework 5.0 JDK 8 and JDK 9, Reactive programming

    with Spring WebFlux 2
  3. 3 ∞

  4. Threading model Not relying on the “1 thread/request” model Using

    non-blocking IO (see NIO Selectors) 4
  5. Flux<T> and Mono<T> Reactive Streams implementation, Powerful for concurrency and

    streaming use cases 5
  6. Spring Boot 2.0 Bringing the Spring Boot experience to the

    Reactive world, Leveraging reactive features in all Spring projects 6
  7. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Smart Meter Applications 7 Aggregator Dashboard ⚡ ⚡ ⚡ ⚡ ' ⚡
  8. #devoxx #springboot Demo - Smart Sensors

  9. Template engine integration How to deal with Flux<T> at the

    view model level? 9
  10. Thymeleaf 3.0 reactive support Flushing strategies for progressive rendering -

    “chunked mode” Rendering template fragments as SSE events - “data-driven mode” 10
  11. Spring Data Kay Reactive support for Redis, MongoDB, Couchbase and

    Cassandra Infinite streams from the datastore with @Tailable 11
  12. #devoxx #springboot Demo - Dashboard

  13. Spring Boot Actuator Works now with Spring MVC, Spring WebFlux

    and Jersey Unified way to implement custom endpoints 13
  14. Spring Boot Actuator Better output format Separate status endpoint 14

  15. Spring Boot Actuator Simplified Security model 15

  16. Spring Boot Actuator Move to Micrometer Think SLF4J, but for

    metrics 16 • Instrument without vendor lock-in: • Prometheus • Netflix Atlas • Influx • Datadog • Statsd • Graphite • … • Multi-dimensional metrics
  17. Spring Boot soon in RC phase Check out release notes

    and our (WIP) migration guide! 17
  18. #devoxx #springboot Demo - Actuator

  19. #devoxx #springboot Thanks! @snicoll @bclozel on Twitter https://gitter.im/spring-projects/spring-boot