Skip to content

Whats New In Spring Boot 2

Andrew Serff edited this page Dec 22, 2017 · 1 revision

What's new in Spring Boot 2.0

Boot 2.0 should come out the end of Feb

  • Java 8 + only

Reactive

Non-blocking Event Driven at the center more scalability than speed

Project Reactor and Reactive Streams

Two Types:

  • Mono - Basically a single item future
  • Flux - A producer of future items

There is a spring-boot-starter-webflux and it uses netty as the default.

Changes to Boot

###Configuration Properties

  • Relaxed binding stays the same
  • Uniform format for reading properties
    • Elements seperated by dots
    • must be alpha-numeric
    • must be lowercase
    • hyphen can be used to seperate words
  • Consistent behavior for Collections
  • You can provide dots and array indexes with underscores in env vars
  • They added more types like Duration 1s, 2m, 5d
  • Origin support - Tells you where a property came from

Gradle Plugin

  • bootRepackage replaced by bootJar abd bootWar
  • Explicit dependency management that you have to enable.

Actuator Endpoints

You used to have to write seperate implementation for http or jmx if you wanted to expose something.

  • @Endpoint, @ReadOperation, @WriteOperation, @DeleteOperation, @EndpointWebExtention
  • Works with MVC, Jersey and Spring WebFlux

What's still evolving

  • Metrics
    • Exist in Boot 1.5
    • Migrating to Micrometer
    • Hierarchical metrics replaced by dimensional metrics
    • Facade over multiple monitoring systems
  • Security
    • Simplified security auto-configuration
    • The health and info endpoints are open to the world
    • Just add your own WebSecurityConfigurereAdapter to override.
    • OAuth 2.0
      • moved to the new Spring Security 5.0 OAuth
      • support for multiple client registrations
      • Authorization server/resource serrver support
Clone this wiki locally