-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Spring Boot 2.0.0 RC1 Release Notes
For changes in earlier milestones, please refer to:
See instructions in the 2.0.0.M7 release notes for upgrading from v2.0.0.M7 and earlier.
Just like in 2.0.0.M1 with other starters, we’re removing spring-boot-starter-web
as a transitive dependency from spring-boot-starter-freemarker
.
We’ve decided to change the default for suffix path matching in Spring MVC applications (see #11105). This feature is not enabled by default anymore, following a best practice documented in Spring Framework.
If your application expects requests like "GET /projects/spring-boot.json"
to be mapped to @GetMapping("/projects/spring-boot")
mappings, this change is affecting you.
For more information about this and how to mitigate that change, check out the reference documentation about path matching and content negotiation in Spring Boot.
The JSON format has changed to now properly include information about context hierarchies, multiple DispatcherServlets
, deployed Servlets and Servlet filters. See #9979 for a sample JSON document.
The endpoint has been renamed to httptrace
and, as a result, can now be accessed at /actuator/httptrace
. The structure of the response has been refined to reflect the endpoint’s focus on tracing HTTP request-response exchanges. More details about the endpoint and its response structure can be found in the relevant section of the Actuator API documentation.
Jolokia is now an Actuator endpoint and can be managed like any other endpoint. As a result, its namespace has moved to management.endpoint.jolokia
.
In our effort to limit the number of root namespaces that Spring Boot uses, banner-related properties have been relocated to spring.banner
.
Also, spring.metrics
are now available at management.metrics
.
We’ve moved back ApplicationReadyEvent
to its former position and added a new event, ApplicationStartedEvent
.
ApplicationStartedEvent
is sent after the context has been refreshed but before any application and command-line runners have been called. ApplicationReadyEvent
is sent after any application and command-line runners have been called. It indicates that the application is ready to service requests.
See the updated reference documentation.
We’ve restored the ability to auto-configure a single user via configuration keys. These can be found at spring.security.user
.
The API for configuring Spring Security matchers has been modified to accommodate more matchers. For servlet applications, a RequestMatcher
can be obtained via PathRequest
. StaticResourceRequest
is now accessible via PathRequest.toStaticResources()
. A matcher for the configured H2console path can be obtained via PathRequest.toH2Console()
.
EndpointRequest
and PathRequest
have been added for WebFlux applications for obtaining a ServerWebExchangeMatcher
.
AuditEventRepository
now has a single method with all optional arguments. The related endpoint no longer requires an after
parameter.
server.*
configuration properties that are specific to Servlet-based web applications (rather than reactive web applications) have been moved to server.servlet.*
. Please see the configuration changelog for further details.
The requestFactory(ClientHttpRequestFactory)
method has been replaced by a new requestFactory(Supplier<ClientHttpRequestFactory> requestFactorySupplier)
method. The use of a Supplier
allows every template produced by the builder to use its own request factory, thereby avoiding side-effects that can be caused by sharing a factory. See #11255.
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
With Spring Boot 2.0, many configuration properties were renamed/removed and developers need to update their application.properties
/application.yml
accordingly. To help you with that, Spring Boot ships a new module org.springframework.boot:spring-boot-properties-migrator
. Once added as a dependency to your project, this will not only analyze your application’s environment and print diagnostics at startup, but also temporarily migrate properties for you.
After Tomcat and Undertow, we now support HTTP/2 with Jetty. No need to change you JVM boot classpath or use a Java agent: we’re using here the Conscrypt library for native TLS support. Check out the reference documentation for this feature.
Integration with Micrometer has been further improved:
-
JVM threads and garbage collections metrics are now automatically instrumented
-
Cache metrics for all available caches on startup have been restored
-
RabbitMQ metrics are now automatically instrumented
-
Asynchronous controllers are now instrumented
It is possible to control the date format for date types from well-known packages (java.util
, org.joda.time
and java.time
) using a single property.
It is now possible to customize the properties
Hibernate uses in a more fine grained way by exposing a HibernatePropertiesCustomizer
bean.
GSon support has been greatly improved with the ability to configure it programmatically and declaratively (see spring.gson
for more details).
We’re always tracking performance numbers and we’ve recently improved the performance startup time to avoid performance regressions from Spring Boot 1.5.x. See #11226.
Here’s live demo at SpringOne Platform 2017. Another good reason to upgrade to Spring Boot 2.0!
Atomikos waits for active transactions to terminate properly on shutdown which should significantly decrease the need for recovery.
It is now possible to expose a RedisCacheConfiguration
to take control over the RedisCacheManager
.