-
Notifications
You must be signed in to change notification settings - Fork 0
Spring Boot 1.3.0 Full Release Notes
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.
The following application.properties
keys have been renamed to improve consistency:
-
spring.view.
tospring.mvc.view.
-
spring.pidfile
tospring.pid.file
-
error.path
toserver.error.path
-
server.session-timeout
toserver.session.timeout
-
servet.tomcat.accessLogEnabled
toserver.tomcat.accesslog.enabled
-
servet.tomcat.accessLogPattern
toserver.tomcat.accesslog.pattern
-
servet.undertow.accessLogDir
toserver.undertow.accesslog.dir
-
servet.undertow.accessLogEnabled
toserver.undertow.accesslog.enabled
-
servet.undertow.accessLogPattern
toserver.undertow.accesslog.pattern
-
spring.oauth2.
tosecurity.oauth2.
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.
In order to prevent double initialization Spring specific log configuration files can now be used. It’s recommended (although not required) that you rename any default log configuration files to use a -spring
suffix. For example logback.xml
would change to logback-spring.xml
.
In Spring Boot 1.2, if you specified a custom logging configuration file using logging.config
and the file did not exist, it would silently fallback to using the default configuration. Spring Boot 1.3 fails due to the missing file. Similarly, if you provided a custom Logback configuration file which was malformed, Spring Boot 1.2 would fall back to its default configuration. Spring Boot 1.3 fails and reports the problems with the configuration to System.err
.
The spring.hateoas.apply-to-primary-object-mapper
property has been removed as the Spring HATEOAS auto-configuration has been reworked such that it no longer affects the context’s primary ObjectMapper
. It has been replaced with a property named spring.hateoas.use-hal-as-default-json-media-type
which controls whether or not
the Spring HATEOAS HTTP message converter will handle requests for application/json
in addition to requests for
application/hal+json
.
The security settings for what information is visible on the actuator /health
endpoint have been tweaked a little to provide better consistency. See the HTTP health endpoint access restrictions section in the reference guide for complete details.
Spring Boot 1.2 supported native response compression for Tomcat users, or compression using Jetty’s GZipFilter for users of Jetty, Tomcat, and Undertow. Motivated by the Jetty team’s deprecation of their gzip filter, Spring Boot 1.3 replaces this with support for native response compression in all three embedded containers. As a result the server.tomcat.compression.
and spring.http.gzip.
properties are no longer supported. The new server.compression.*
properties should be used instead.
Tomcat’s RemoteIpValve
is now configured and enabled to support x-forwarded-for
and x-forwarded-proto
headers. If you want to disable RemoteIpValve
set server.tomcat.remote-ip-header
and server.tomcat.protocol-header
to empty strings.
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.
Stacktrace information is now never included when Spring MVC renders an error response. If you want Spring Boot 1.2 behavior set error.include-stacktrace
to on-trace-param
.
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 applications no longer fail to start when a /templates
folder cannot be found. If you are using a supported templating technology, and you forget to add /templates
, a warning is now logged instead.
The GroovyTemplateProperties
class now extends AbstractTemplateViewResolverProperties
and provides additional configuration options. If you currently define a prefix.spring.groovy.template.prefix
property to define a custom resource location you should rename it to prefix.spring.groovy.resource-loader-location
.
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'
}
}
The Spring Boot Gradle plugin will no longer apply Gradle’s application plugin by default. If you wish to make use of the application plugin you will have to apply it in your build.gradle
.
If you do not need the functionality provided by the application plugin, but were using its mainClassName
or applicationDefaultJvmArgs
properties then you will need to make some minor updates to your build.gradle
.
The main class should now be configured using the mainClass
property on the springBoot
extension, for example:
springBoot { mainClass = 'com.example.YourApplication' }
applicationDefaultJvmArgs
should now be configured in your project’s ext
block,
for example:
ext { applicationDefaultJvmArgs = [ '-Dcom.example.property=true' ] }
If you were configuring your project’s main class using the main
property of the application plugin’s run
task, you should move this configuration to the bootRun
task instead:
bootRun { main = com.example.YourApplication }
The Spring Boot Maven plugin no longer adds src/main/resources
directly to the classpath when using spring-boot:run
. If you want live, in-place editing we recommend using Devtools. The addResources
property can be set in your pom.xml
if you want to restore Spring Boot 1.2. behavior.
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.
Spring Boot 1.3 uses Spring Security 4.0. See the Spring Security documentation for information on migrating from 3.2.