-
Notifications
You must be signed in to change notification settings - Fork 40.8k
Spring Boot 2.0.0 M4 Release Notes
For changes in earlier milestones, please refer to:
See instructions in the 2.0.0.M3 release notes for upgrading from v2.0.0.M2 and earlier.
Spring Boot 2.0 brings important changes to the Actuator: you should expect changes in the programming model, configuration keys and the response format of some endpoints. Actuator is now natively supported on Spring MVC, Spring WebFlux and Jersey.
Note
|
We are still working on this feature and expect some adaptation in future milestones so please reach out to us if you have trouble upgrading! |
The code of the Actuator has been split in two modules: the existing spring-boot-actuator
and a new spring-boot-actuator-autoconfigure
. If you were importing the actuator using its original module (spring-boot-actuator
), please consider using the spring-boot-starter-actuator
starter instead.
Important user-facing changes include:
-
Spring Boot’s own metrics have been replaced with support, including auto-configuration, for Micrometer and dimensional metrics. You can learn more about Micrometer in its user manual and Spring Boot’s reference guide (#9970)
-
Endpoint’s path are no longer configurable (i.e.
endpoints.<id>.path
) -
The Hypermedia support has been simplified (#9901)
-
Regex-based matching now uses query parameters rather than path variables (#9796)
-
/application/env
has a new format (#9864) -
/application/flyway
has a new format (#9973) -
/application/liquibase
has a new format (#9974) -
/application/health
has a new format (#10249) and now exposes full details only. For a status-only output, a new/application/status
is available (#9864)
If you have custom actuator endpoints, please check out the dedicated blog post. The team also wrote a wiki page that describes how to migrate your existing Actuator endpoints to the new infrastructure.
Another important change is that there is no longer a separate security auto-configuration for the Actuator:(management.security.enabled
) no longer exists and web endpoints are disabled by default (endpoints.default.web.enabled
) to prevent exposing sensitive information by default. The sensitive
flag of each endpoint is also gone to make things more explicit in the security configuration. To restore the previous behaviour:
-
Enable Actuator web endpoints:
endpoints.default.web.enabled=true
in your configuration -
Create or adapt your security configuration to secure endpoints with the role of your choice (see the
Security
section below)
Security auto-configuration has been completely revisited: developers should read the companion blog post and refer to the Spring Boot 2.0 Security wiki page for more details about the change.
Jolokia is no longer an endpoint and is disabled by default for consistency with all web endpoints. Its configuration infrastructure has moved to management.jolokia
. To enable Jolokia, add management.jolokia.enabled=true
to your configuration.
Spring Boot now requires Gradle 4.x. (#9516)
Liquibase and Flyway configuration keys were moved to the spring
namespace (i.e. spring.liquibase
and spring.flyway
respectively).
The default value of @AutoConfigureOrder
has changed from Ordered.LOWEST_PRECEDENCE
to 0
. (#10142)
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
Already covered at large in the migration part, Actuator now runs natively on Spring MVC, Spring WebFlux and Jersey. Adding the dependency and enabling web endpoints (using for instance endpoints.default.web.enabled
) is all that’s required.
As Spring Boot 2 brings important configuration keys changes, we did our best to assist you with the migration of your configuration. Spring Boot now ships with deprecation metadata for configuration keys that were removed or relocated. Check out your favourite IDE auto-completion for extra help! (#10076)
If Flyway or Liquibase is managing the schema of your DataSource
and you’re using an embedded database, Spring Boot will now automatically switch off Hibernate’s automatic DDL feature.
Database initialization for Spring Batch, Spring Integration, Spring Session and Quartz now occurs by default only when using and embedded database. The enabled
property has been replaced with a more expressive enum. For example, if you want to always perform Spring Batch initialization you can set spring.batch.initialize-schema=always
.
Maven-based applications using spring-boot-starter-parent
use the -parameters
flag by default.
A new ApplicationContextRunner
test utility makes it very easy to test your auto-configurations. We’re moving all our test suite to this new model. A dedicated section in the reference documentation is expected for the next milestone.