Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's new in Spring boot 2.0 - Spring IO

What's new in Spring boot 2.0 - Spring IO

Madhura Bhave

May 29, 2018
Tweet

More Decks by Madhura Bhave

Other Decks in Programming

Transcript

  1. Agenda •What’s New • Infrastructure Upgrades • Spring Framework 5

    • Micrometer Support •What’s Changed • Configuration Properties • Actuator Endpoints • Security
  2. Reactive Spring •Blocking • Large thread pool required • Each

    request gets its own thread •Non-Blocking • Small thread pool • Worker threads process events
  3. Reactive Spring •Servlet Stack • Servlet Container • Servlet API

    • Spring MVC •Reactive Stack • Netty, Servlet 3.1 • Reactive HTTP layer • Spring WebFlux
  4. Reactive Spring •Non-blocking •Event loop at the center •More for

    scalability than speed •You can still use Spring MVC
  5. MICROMETER SUPPORT •Auto-configuration for metrics instrumentation library - Micrometer •Hierarchical

    metrics replaced by dimensional metrics •Facade over multiple monitoring systems
  6. Configuration Properties •Relaxed Binding rules stay the same •Uniform format

    for reading properties from the environment • Elements separated by dots • Must be alpha-numeric • Must be lowercase • Hyphen can be used to separate words my.foo.hello-world my.foo.helloWorld my.foo.hello_world my.foo.helloworld
  7. Configuration Properties •Indices in environment variables • my_foo_1 my.foo[1] •

    my_foo_1_2 my.foo[1][2] •Consistent behavior for Collections •Better types, e.g. Duration “1s” “2m” “5d” •Origin support
  8. Actuator Endpoints •Endpoint annotations • @Endpoint, @WebEndpoint, @JmxEndpoint •Tech independent

    operations • @ReadOperation, @WriteOperation, @DeleteOperation •Tech specific extensions • @EndpointWebExtension, @EndpointJmxExtension https://2018.springio.net/sessions/mastering-spring-boots-actuator
  9. Actuator Endpoints •Works with: • Spring MVC • Spring WebFlux

    • Jersey •Reactive Health Indicators •Overhaul of the “/actuator/mappings” & “/actuator/trace” endpoints
  10. Security •Simpler security auto-configuration •Auto-configuration backs-off easily •Adding custom security

    is easy •No ordering issues with `WebSecurityConfigurerAdapter` •RequestMatchers for static resources and actuators •Auto-configuration for reactive security
  11. Security •OAuth 2.0 • Moving to Spring Security 5.0 •

    Support for multiple client registrations • Authorization Server/Resource Server support https://github.com/spring-projects/spring-security-oauth2-boot