If your team still runs Java 8 or 11 on Spring Boot 2, you’ve probably had this upgrade on the backlog for a while. It never wins against the next customer feature, because the system works and the upgrade doesn’t show up in a demo.
The trouble is that the cost of waiting grows quietly. Every month, more of the libraries you depend on release fixes only for the new stack, and the jump you’ll eventually have to make gets a little wider.
This article is for the engineering manager or CTO who has to plan that jump. It covers why now is a sensible time, what actually breaks, how to break the work into stages that each go to production, and how to estimate it from your own code instead of from someone’s rule of thumb.
1. Why the upgrade has stopped being optional
Spring Boot 3 requires Java 17 at minimum and is built on Jakarta EE. Open-source support for Spring Boot 2 has ended, so security fixes for the framework under your application now come only on the 3.x line, unless you pay for extended commercial support. Oracle stopped free public updates of Java 8 for business use years ago. Other distributions still ship patched builds of 8 and 11, but the wider ecosystem has moved on: new versions of drivers, SDKs and libraries increasingly target Java 17 and Spring Boot 3 only.
There’s a people side as well. Experienced Spring developers expect to work with current Spring, and a candidate who sees Java 8 in the job ad will ask how much else is out of date. And there are real gains waiting on the other side. Java 21 is a long-term support release with virtual threads, records and pattern matching, and Spring Boot 3.2 and later can run request handling on virtual threads with a configuration switch. For services that spend most of their time waiting on databases and other APIs, that can mean handling more concurrent requests on the same hardware. Measure it on your own load before you count on it.
For managers: Staying on Spring Boot 2 means running without upstream security fixes. Treat the upgrade as maintenance you owe, then enjoy the new features as a bonus.
2. The javax to jakarta switch touches more than you think
Jakarta EE renamed the packages: javax.persistence became jakarta.persistence, javax.servlet became jakarta.servlet, javax.validation became jakarta.validation, and so on. Spring Boot 3 uses the new names everywhere. The change in your own source code is mostly a search and replace, and tools such as OpenRewrite automate a large part of it.
The harder part is everything you didn’t write. Every library that touches servlets, persistence or validation has to be on a version built for jakarta, and some never got one. Springfox, a common way to generate Swagger docs, doesn’t work with Spring Boot 3; teams usually move to springdoc-openapi 2. Spring Cloud Sleuth was replaced by Micrometer Tracing. RestTemplate setups built on Apache HttpClient 4 need HttpClient 5. If you deploy WAR files to an external Tomcat, that server has to move to a version that speaks jakarta, too. Note that some javax packages, such as javax.sql and javax.crypto, are part of the JDK and stay exactly as they are, which is why a blind replace across the whole codebase causes its own breakage.
For managers: Before you estimate, list every third-party dependency and check whether it has a jakarta-compatible release. The libraries without one decide your schedule.
3. Security, Hibernate and the JDK itself
Spring Security 6 removed WebSecurityConfigurerAdapter. Security configuration is now a SecurityFilterChain bean, antMatchers gave way to requestMatchers, and authorizeRequests to authorizeHttpRequests. The rewrite is usually short. Getting it wrong, though, can quietly open or close an endpoint, so every access rule needs a test that proves who can and can’t reach it. Spring Framework 6 also stopped matching trailing slashes by default, so a client calling /orders/ no longer reaches a controller mapped to /orders.
Hibernate 6 comes with Spring Boot 3. Its query parser is stricter, so HQL that older versions tolerated can fail at startup or behave differently. Custom column types, ID generation and some native queries need checking against the new version. On the JDK side, Java 11 removed the Java EE modules that used to ship with it (JAXB and JAX-WS among them), and Java 17 strongly encapsulates JDK internals, so libraries that reached into them by reflection start failing. Build tooling has to keep up as well: older versions of Lombok, Mockito, JaCoCo and various Maven or Gradle plugins can’t handle newer class files.
For managers: The risky changes are in security config and database queries. Make sure both are covered by tests before you touch them.
4. Build the safety net first
An upgrade without tests is a guess that you find out about in production. You don’t need full coverage before you start. What you need is coverage of the flows that would hurt: login and permissions, the main write paths, payments or billing if you have them, and the integrations other systems depend on.
Where unit tests are thin, write a few broad tests that call the real API and check what comes back. They’re crude, but they’ll catch a changed JSON field, a missing header or a query that returns different rows. A green pipeline that runs those tests on every commit is the single best predictor of a calm upgrade.
For managers: Spend the first part of the upgrade budget on tests for the flows that matter most. Everything after that gets cheaper.
5. Upgrade in stages, each one shipped to production
The stages that tend to work look like this. First, bring Spring Boot 2 up to its last release line, 2.7, and Java up to 17, which 2.7 runs on. That isolates JDK problems from framework problems. Next, while you’re still on 2.7, clear the deprecation warnings and move security config to the SecurityFilterChain style, which 2.7 already supports. Then make the actual jump to Spring Boot 3, the jakarta namespace and Hibernate 6, using the spring-boot-properties-migrator module to flag renamed settings. Last, move the runtime to Java 21 and decide, with measurements, whether virtual threads help your workload.
Each stage goes all the way to production and runs there for a while before the next one starts. If something breaks, you know which stage caused it, and rolling back is a small step rather than a lost quarter. If you run several services, upgrade one low-risk service end to end first and use what you learn on the rest.
For managers: Never combine the Java upgrade, the Spring Boot upgrade and new features in one release. Small steps make every failure easy to trace.
6. Estimating the effort from your own code
We won’t quote you a number of weeks per thousand lines, because the size of the codebase is only one input and often not the biggest one. What moves the estimate is how many modules or services you have, how many dependencies lack a jakarta version, how much custom security and Hibernate code exists, and how good the test coverage is.
The most reliable way to find out is a short, timeboxed spike. Run the automated migration recipes on a branch, try to compile, run the tests and count what’s left: compile errors, failing tests, libraries with no upgrade path. That list turns a vague worry into a backlog you can size. If nobody on the team has time for the spike, a fixed-scope technical assessment does the same job from the outside. We read the Java code base, the pipeline and the security posture and put the findings in writing: what to keep, what to modernize first, and what it will take.
For managers: Base the estimate on a spike against your real code. A plan built on the actual list of breakages beats any rule of thumb.
7. Keeping features moving while the upgrade runs
The worst way to upgrade is on a long-lived branch that drifts further from main every week while the product team keeps shipping. Merge upgrade work into main in small pieces instead. Most of the early stages, from new tests to Java 17 and the cleaned-up security config, are compatible with the old stack and can ship alongside regular features.
The jakarta jump is the one change that really has to land at once in each service. Keep that window short by doing everything else beforehand, and agree with the product team on a few days when changes to that service pause. Some teams give the upgrade to a small group or an outside team so the rest keep their pace. That’s how CS2 tends to work on modernization: on the Vodafone Kabel Deutschland platform, the Java EE 7 to Spring Boot migration and the move from OAuth 1.0 to JWT happened on the live system while field technicians kept using it every day. Our own products, Notermed and GWS Connect, run on Java 17 Spring Boot APIs, so we deal with the same upgrade path in our own code.
For managers: Merge small and often, and save the one real cutover for a short, announced window per service.
The short version
Spring Boot 2 is out of open-source support, and Spring Boot 3 needs Java 17 and the jakarta namespace. The hard parts are third-party libraries, security config and Hibernate queries, so put tests around those first. Upgrade in stages that each reach production, estimate from a spike on your real code, and keep the product shipping by merging small changes into main.