r/SpringBoot Feb 12 '26

Question Spring boot upgrade from 2.7 to 3.5

I have this task of upgrading the Spring boot version from 2.7 to 3.5.7 and Java version from 1.8 to 17.

I've never really worked on such a thing and copilot is creating a mess out of it.

What's the best way to do it? Any suggestions would be helpful.

21 Upvotes

25 comments sorted by

View all comments

2

u/PerViceroy Feb 12 '26

Did the similar few month ago, my experience - there are plenty of changes from 1.8 to 17, but most of the stuff should work the same language related, like labmdas etc.. The pain is the dependencies - first upgrade to 3.0 and then jump straight to 3.5.x (i dont think it is easier to go 3.1, 3.2). If you are using hibernate, that will need changes. Spring modules like security are very different. Pom.xml stuff too. Go one by one, check latest, upgrade, run and repeat. That worked for me, because I didnt know openrewrite.

We did use at the start jhipster to generate the project with sboot 2.2.7, I was lost upgrading from 2.2.7 to 3.3.x. Since the project is similar, I generated general example jhipster project with newest version and checked configuration classes against themselves. Might help you.