Spring Boot upgrade
Useful reads
-
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes
-
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Security-2.0
-
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide
-
https://spring.io/blog/2017/11/01/spring-security-5-0-0-rc1-released#password-encoding
Module developers
-
Spring Boot property relaxed binding has changed, you must now use the canonical format in code when referencing a property
Property renaming
A lot of Spring Boot properties have been renamed for consistency and to differ between Servlet and Webflux setups. See the Boot 2.0 migration guide for more information on the new properties.
Dependencies
-
artifact
org.hibernate:hibernate-validatorhas been moved toorg.hibernate.validator:hibernate-validator-
you should revise your application dependency tree to avoid pulling it in twice, use
org.hibernate.validatorto ensure you have the latest version
-
Spring libraries
-
The behavior or
spring.config.locationhas been changed, to get the old behaviorspring.config.additional-locationshould be used instead: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#configuration-location -
Spring ORM JPA uses Oracle12c dialect by default instead of 10
-
users might need to specify
Oracle10gDialectas Hibernate dialect specifically
-
-
Several Spring Data
Repositoryinterfaces have been modified. Certain often used methods have been removed altogether and replaced with new alternatives (with a different signature).-
findOne(id)has been replaced byfindById(id)and now returns anOptional. -
delete(List)has been replaced bydeleteAll(Iterable). The same goes forsave(List).
-
-
Spring data commons has renamed
QueryDslPredicateExecutortoQuerydslPredicateExecutor(in the same package).-
when using Cache annotations be aware that
#resulton anOptionalreturning method refers to the actual content of theOptionalif it is not empty
-
-
Hibernate upgrades to 5.2, see migration guide: https://github.com/hibernate/hibernate-orm/blob/5.2/migration-guide.adoc
-
Dateclasses in json responses are not serialized as timestamps anymore, if you want the older behaviour, setspring.jackson.serialization.write_dates_as_timestamps: true -
The behaviour of
UriComponentsBuilderhas been changed somewhat in Spring 5. Calls to.queryParamare now seen as literals and will not be url encoded anymore. If you want query parameters to be encoded you must use templated variables as seen on https://docs.spring.io/spring/docs/5.1.12.RELEASE/spring-framework-reference/web.html#web-uri-encoding. It is advisable to search your code for.queryParam(calls and change them to templated variables if they contain characters like: + or / (e.g. urls).