-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Spring Boot 2.1.0 M1 Release Notes
Classes, methods and properties that were deprecated in Spring Boot 2.0 have been removed in this release. Please ensure that you aren’t calling deprecated methods before upgrading.
Bean overriding has been disabled by default to prevent a bean being accidentally overridden. If you are relying on overriding, you will need to set spring.main.allow-bean-definition-overriding to true.
If spring-security is on the classpath without any security configuration, /info and /health are now exposed publicly for consistency. If you have spring-security on your classpath and do not provide any security configuration, you will need to explicitly secure them.
Dependency management for json-simple is no longer provided and the JsonParser implementation using it has been removed.
A starter could declare a META-INF/spring.provides so that an IDE can figure out what dependencies it provides. Scanning the starter POM for the immediate dependencies that it declares should be enough of an indication. If you are responsible of a third-party starter and you declare this file, it can be removed.
The server.servlet.path property has moved to spring.mvc.servlet.path. If you were relying on that property programmatically to know the path of the DispatcherServlet please use DispatcherServletPath instead.
The finalName property is no longer customizable to align with the behaviour of standard Maven plugins.
|
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
Spring Boot 2.1 builds on and requires Spring Framework 5.1.
We’ve upgraded to the latest stable releases of other third-party jars wherever possible. Some notable dependency upgrades in this release include:
-
Tomcat 9
-
Undertow 2
-
Hibernate 5.3
-
JUnit 5.2
Profile matching has been improved to support an expression format. For instance production & (us-east | eu-central) indicates a match if the production profile is active and either the us-east or eu-central profiles are active.
Profile expression can be used as follows:
-
Enable componets using
@Profile -
Enable Logback configuration using
<springProfile>
A new /actuator/caches endpoint lists the available CacheManager instances and their respective caches with basic metadata. See the API for more details.
If you are using Spring Integration, a graph representation of all Spring Integration components can be exposed at /actuator/integrationgraph. Please see the API for more details.
An HealthIndicatorRegistry bean is now available to add and remove HealthIndicator at runtime. The health endpoint has also been improved to query a specific indicator if necessary. For instance /actuator/health/db executes only the "db" HealthIndicator. Please see the API for more details.
A reactive HealthIndicator for Apache Cassandra is available.
Common tags can be applied to all meters declaratively as show in the following example:
management.metrics.tags.region=us-east-1
management.metrics.tags.stack=prodThe example above adds a region and stack tags to all meters with a value of us-east-1 and prod respectively.
Metrics coverage has been improved:
-
Hibernate metrics
-
WebClient
Support for WebFlux OAuth2 login has been added.
OpenID Connect providers are easier to configure using an issuer-uri which is the URI that the it asserts as its Issuer Identifier.
As an alternative option to Jest, auto-configurations for RestClient and RestHighLevelClient are provided with configurable options from the spring.elasticsearch.rest.* namespace.
The auto-configured ConnectionFactory is cached by default using CachingConnectionFactory until the pooling option is enabled or spring.jms.cache.enabled is set to false. Pooling option has also been extended to Artemis (see spring.jms.artemis.pool.*).
All @…Test annotations are meta-annotated with @ExtendedWith(SpringExtension.class) so this redundant part of the setup can be removed if you’re using JUnit 5. Spring Boot also uses a maven-surefire-plugin version that does not require any custom setup to use JUnit 5.
Specifying arguments has been improved with dedicated options for system properties and environment variables.
It is also possible to repackage and replace a classified artifact, see the updated documentation of the classifier attribute.
As well as the changes listed above, there have also been lots of minor tweaks and improvements including:
-
@ConditionalOnEnabledEndpointcan be used on any component (e.g. something that is only required by the endpoint and shouldn’t be created if the endpoint is disabled). -
@WebMvcTestauto-configures Spring Data REST as well (e.g. support forSortandPageablerequest arguments). -
It is no longer necessary to export a dummy
ResourceConfigto enable Jersey support. -
It is easier to create a
WebServiceTemplateusing an auto-configuredWebServiceTemplateBuilder. -
Jackson visiblity can be configured using
spring.jackson.visiblity.*. -
Error page shows stacktraces when Devtools is in use.
-
JNDI lookups have been improved to enable
resourceRefby default. -
Customization of the
RetryTemplateused by the Rabbit infrastructure is available viaRabbitRetryTemplateCustomizer. -
Auto-configuration exclusions are now applied consistently.
-
Support HTTP/2 with Reactor Netty.
-
setConnectTimeout(int)andsetReadTimeout(int)have been deprecated in favour of similar methods that take aDuration.
-
The pooling implementation for ActiveMQ and Artemis is not compatible with JMS 2.0. We’re considering switching to another implementation in M2, watch #13927 for more details.