-
Notifications
You must be signed in to change notification settings - Fork 40.8k
Spring Boot 1.3.0 M1 Release Notes
Spring Boot’s gradle plugin has been updated in this release to use the dependency management plugin. Most users should be unaffected by this change, however those who were using the versionManagement
configuration to apply their own blessed versions will have to update their build scripts.
Rather than requiring a properties file to configure version management, the new plugin allows you to use a Maven bom. For example:
dependencyManagement {
imports {
mavenBom 'com.example:example-bom:1.0'
}
}
Classes, methods and properties that were deprecated in Spring Boot 1.2 have been removed in this release. Please ensure that you aren’t calling deprecated methods before upgrading.
Spring Boot 1.2 registered any Jackson Module beans with every ObjectMapper
in the application context. This made it impossible to take complete control of an ObjectMapper
bean’s modules. Spring Boot 1.3 will only register Jackson Module beans with ObjectMappers
that are created or configured with the auto-configured Jackson2ObjectMapperBuilder
. This brings the behaviour of module configuration into line with Boot’s other Jackson configuration.
The spring-boot-starter-jetty
"Starter POM" no longer includes org.eclipse.jetty:jetty-jsp
. If you are using Jetty with JSPs you will now need to directly add this dependency yourself.
Spring Boot 1.3 uses Spring Security 4.0. See the Spring Security documentation for information on migrating from 3.2.
Due to the upgrade to Spring Security 4, Spring Boot 1.3 has also upgraded the dependency management and auto-configuration of Thymeleaf’s Spring Security support. The coordinates of the new artifact are org.thymeleaf.extras:thymeleaf-extras-springsecurity4
. Please update your pom.xml
or build.gradle
accordingly.
Spring Boot 1.3 now supports the use of Maven boms to configure its dependency management in place of the properties file-based metadata. @DependencyManagementBom
should be used in place of @GrabMetadata
to provide the coordinates of a bom, for example @DependencyManagementBom("io.spring.platform:platform-bom:1.1.2.RELEASE")
.
Spring Boot 1.3 requires Spring Framework 4.2 or later and is not compatible with earlier versions.
-
The
ConfigurableEmbeddedServletContainer
setJspServletClassName
andsetRegisterJspServlet
methods have been replaced bysetJspServlet
. -
The
EndpointMBean
class (and subclasses) now expect anObjectMapper
to be provided to the constructor. -
The
DropwizardMetricWriter
had been replaced byDropwizardMetricService
. -
@ConditionalOnMissingClass
now expects the class name to be provided using thevalue
attribute rather thanname
.
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
Spring Boot 1.3 builds on and requires Spring Framework 4.2. Several 3rd party dependencies have been upgraded with this release. No major upgrades have been made to the Tomcat or Jetty versions with this release.
Spring Boot 1.3 includes a new spring-boot-devtools
module which aims to improve the development-time experience. The module provides:
-
Sensible property defaults (for example disabling template caches)
-
Automatic application restarts
-
LiveReload support
-
Remote development support (including remote updates and remote debug via an HTTP tunnel).
See the updated documentation for more information.
Auto-configuration is now provided for the following cache technologies:
-
EhCache
-
Hazelcast
-
Infinispan
-
Any compliant JCache (JSR 107) implementation
-
Redis
-
Guava
In addition, simple Map
based in-memory caching is also supported. Caching is automatically configured when your application @Configuration
is annotated with @EnableCaching
. Cache statistics are now also exposed as an actuator endpoint (when the underlying technology allows).
For complete details see the updated documentation.
The spring-boot-actuator
metrics support has been extended to support export and aggregation. In addition, Java 8 specific GaugeService
CounterService
and implementations are now provided (and used when possible) which offer improved performance.
See the extended metrics documentation for details.
The Spring Boot Maven and Gradle plugins can now generate full executable archives for Linux/Unix operating systems. Furthermore you can now easily install these JARs as init.d
or systemd
services. Running a fully executable JAR is as easy as typing:
$ ./myapp.jar
and to install it as an init.d
service:
$ sudo link -s /var/myapp/myapp.jar /etc/init.d/myapp
Additional information is available in the reference documentation.
You can now use @EnableAuthorizationServer
and @EnableResourceServer
to quickly create OAuth2 authorization and resource servers. In addition, @EnableOAuth2Client
allows your application to act as an OAuth2 client. For details see the overhauled security section of the reference guide.
Additional HealthIndicators
are now provided and auto-configured for:
-
Elasticsearch
-
Email
-
JMS
The Actuator’s endpoint now support CORS. Support is disabled by default but can be enabled by configuring endpoints.cors.allowed-origins
.
The auto-configuration report (logged at the DEBUG
level or available via the /autoconfig
actuator endpoint) now explicitly lists configurations that have been manually excluded via @SpringBootApplication(exclude=…)
or @EnableAutoConfiguration(exclude=…)
.
A new spring-boot-starter-validation
"starter POM" is now available to provide bean validation (JSR 303) support.
You can now use regular expression to filter the /env
and /metrics
actuator endpoints. For example http://localhost:8080/metrics/.root.
.
Auto-configuration is now provided for the SendGrid email delivery service.
The Maven plugin now include start
and stop
goals. These enable applications to be started without blocking Maven (allowing other goals to operate on the application). This technique is often used to launch intergration tests from Maven.
A byproduct of this work is that a new SpringApplicationAdminMXBean
interface has been added which (when enabled) allows a Spring Boot application to be controlled via JMX.
The following miscellaneous updates are also include with Spring Boot 1.3:
-
Jackson’s Java 8 module will be automatically registered when using Java 8.
-
A
TransactionTemplate
bean is now included as part ofTransactionAutoConfiguration
. -
A
MailServer
bean can now be obtained via JNDI by using thespring.mail.jndi-name
property. -
You can now configure the servlet name (when using an embedded servlet container) via the
server.display-name
property. -
Flyway migration strategies can now be configured via a
FlywayMigrationStrategy
bean.