-
Notifications
You must be signed in to change notification settings - Fork 40.8k
Spring Boot 1.4.0 RC1 Release Notes
See instructions in the 1.4.0.M3 release notes for upgrading from v1.4.0.M2 and earlier.
The default version of Mongo’s Java Driver is now 3.2.2 (from 2.14.2) and spring-boot-starter-data-mongodb
has been updated to use the new, preferred mongodb-driver
artifact.
The auto-configuration for Embedded MongoDB has also been updated to use 3.2.2 as its default version.
The spring-boot-starter-batch
starter no longer depends on an embedded database. If you were relying on this arrangement, please add a database (driver) of your choice, e.g.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>runtime</scope>
</dependency>
If you had an exclusion on hsqldb
as you were already configuring your own, you can now remove the exclusion.
Spring Boot nows uses Hibernate 5.0.9.Final
by default. If you want to use Hibernate 5.2.x
, updating only the version works as of 5.2.1.Final
since the Hibernate team has re-introduced hibernate-entitymanager
.
The Server
HTTP response header is no longer set unless the server.server-header
property is set.
The @org.springframework.boot.orm.jpa.EntityScan
annotation has been deprecated and should be replaced with @org.springframework.boot.autoconfigure.domain.EntityScan
or explicit configuration.
For example, if you have following configuration:
import org.springframework.boot.autoconfigure.SpringApplication;
import org.springframework.boot.orm.jpa.EntityScan;
@SpringBootApplication
@EntityScan(basePackageClasses=Customer.class)
public class MyApplication {
// ....
}
If you’re using an auto-configured LocalContainerEntityManagerFactoryBean
, switch to:
import org.springframework.boot.autoconfigure.SpringApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
@SpringBootApplication
@EntityScan(basePackageClasses=Customer.class)
public class MyApplication {
// ....
}
Or if you’re defining your own LocalContainerEntityManagerFactoryBean
drop the @EntityScan
annotation entirely and either call LocalContainerEntityManagerFactoryBean.setPackagesToScan(…)
or make use of the EntityManagerFactoryBuilder
packages(…)
method:
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory(
EntityManagerFactoryBuilder builder) {
return builder
.dataSource(...)
.properties(...)
.packages(Customer.class).build();
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
org.springframework.boot.autoconfigure.domain.EntityScan
can now be used to specify the packages to use for JPA, Neo4J, MongoDB, Cassandra and Couchbase. As a result, the JPA-specific org.springframework.boot.orm.jpa.EntityScan
is now deprecated and NodeEntityScan
introduced in a previous milestone has been removed.
A number of third party libraries have been upgraded to their latest version. Updates include Jetty 9.3, Tomcat 8.5, Jersey 2.23, Artemis 1.3, Ehcache 3.1, Elasticsearch 2.3, Spring REST Docs 1.1, Spring AMQP 1.6 & Spring Integration 4.3.
Several Maven plugins were also upgraded.
A new RestTemplateBuilder
can be used to easily create a RestTemplate
with sensible defaults. By default, the built RestTemplate
will attempt to use the most suitable ClientHttpRequestFactory
available on the classpath and will be aware of the MessageConverter
instances to use (including Jackson). The builder includes a number of useful methods that can be used to quickly configure a RestTemplate
. For example, to add BASIC auth support you can use
@Bean
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder.basicAuthorization("user", "secret").build();
}
The auto-configured TestRestTemplate
now uses the RestTemplateBuilder
as well.
The @RestClientTest
annotation can be used if you want to test REST clients. By default it will auto-configure Jackson and GSON support, configure a RestTemplateBuilder
and add support for MockRestServiceServer
.
Spring Boot auto-configures a JestClient
and a dedicated HealthIndicator
if Jest is on the classpath. This allows you to use Elasticsearch
even when spring-data-elasticsearch
isn’t on the classpath.
If Spring Session is configured to use the JDBC store, the schema is now created automatically on startup.
Spring Boot now allows to connect against a secured Artemis/HornetQ broker.
-
The actuator exposes a new
headdump
endpoint that returns a GZip compressedhprof
heap dump file -
Spring Mobile is now auto-configured for all supported template engines
-
The Spring Boot maven plugin allows to bundle
system
scoped artifacts using the newincludeSystemScope
attribute -
spring.mvc.log-resolved-exception
enables the automatic logging of a warning when an exception is resolved by aHandlerExceptionResolver
-
spring.data.cassandra.schema-action
you be used to customize the schema action to take on startup
-
The
spring-boot-starter-hornetq
starter has been deprecated in favour of usingspring-boot-starter-artemis
-
management.security.role
has been deprecated in favour ofmanagement.security.roles
-
The
@org.springframework.boot.orm.jpa.EntityScan
annotation has been deprecated in favor of@org.springframework.boot.autoconfigure.domain.EntityScan
or explicit configuration.