$30 off During Our Annual Pro Sale. View Details »

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

Stéphane Nicoll

November 09, 2017
Tweet

More Decks by Stéphane Nicoll

Other Decks in Programming

Transcript

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

    View Slide

  2. Spring Framework 5.0
    JDK 8 and JDK 9, Reactive programming with Spring WebFlux
    2

    View Slide

  3. 3



    View Slide

  4. Threading model
    Not relying on the “1 thread/request” model
    Using non-blocking IO (see NIO Selectors)
    4

    View Slide

  5. Flux and Mono
    Reactive Streams implementation,
    Powerful for concurrency and streaming use cases
    5

    View Slide

  6. Spring Boot 2.0
    Bringing the Spring Boot experience to the Reactive world,
    Leveraging reactive features in all Spring projects
    6

    View Slide

  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







    '

    View Slide

  8. #devoxx #springboot
    Demo - Smart Sensors

    View Slide

  9. Template engine integration
    How to deal with Flux at the view model level?
    9

    View Slide

  10. Thymeleaf 3.0 reactive support
    Flushing strategies for progressive rendering - “chunked mode”
    Rendering template fragments as SSE events - “data-driven mode”
    10

    View Slide

  11. Spring Data Kay
    Reactive support for Redis, MongoDB, Couchbase and Cassandra
    Infinite streams from the datastore with @Tailable
    11

    View Slide

  12. #devoxx #springboot
    Demo - Dashboard

    View Slide

  13. Spring Boot Actuator
    Works now with Spring MVC, Spring WebFlux and Jersey
    Unified way to implement custom endpoints
    13

    View Slide

  14. Spring Boot Actuator
    Better output format
    Separate status endpoint
    14

    View Slide

  15. Spring Boot Actuator
    Simplified Security model
    15

    View Slide

  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

    View Slide

  17. Spring Boot soon in RC phase
    Check out release notes and our (WIP) migration guide!
    17

    View Slide

  18. #devoxx #springboot
    Demo - Actuator

    View Slide

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

    View Slide