There are few challenges encountered when migrating an application written in springboot 1.5 to 3.x and to successfully fix compilation & run time issues. The List of possible changes in the application are based on the things you have used in your application. I will tell my story when upgrading this.
I have gone through the link https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide to migrate initially from 1.5 to 2.0 and keeping java version same java8. There are basic code changes for this like
- JPA findone → findbyId (method name change)
- server.session.timeout → server.servlet.session.timeout (change of property name)
- package name change - old -org.springframework.boot.web.support.SpringBootServletInitializer new -org.springframework.boot.web.servlet.support.SpringBootServletInitializer
- there are few other changes related to spring security and redis implementation which i have migrated directly to springboot 3.0.1 changes.
Next I started to work on migrate springboot from 2.0 to 3.0.1 with java 17 . All the possible changes are :
a. pom.xml — these are required changes as some of them are removed in spring
b. property name changes /additions-
you may face run time issues without below properties — circular reference bydefault disabled in latest version and ant_path_matcher required as there are changes in spring security.
c. spring security configuration
d. spring session data redis configuration-
e. custom Auth filter — this is used to set context in securitycontextholder for manual authentication and it is not required for basic authentication.
f. spring security basic authentication — springboot3 bydefault enables basic security authentication and prints password in console. If you want custom username and password and you can mention the properties like that below.
Reach out to me if you have any queries —
Sandeep Pagatur
sandeep.pagatur@weboniselab.com
Sr. Java Developer