By technology

From Java 8 to Java 21 and Spring Boot 3: upgrading an old system

Running Java 6, 7 or 8 with Struts, JSF or EJB? Here are the risks of standing still and the path to Java 21 and Spring Boot 3 without rewriting everything.

Fortes Tech TeamUpdated Nov 27, 20263 min read
Quick answer

Old Java systems usually have solid business logic and heavy infrastructure: expensive application servers, slow deployments and libraries with known vulnerabilities. Upgrading to Java 21 and Spring Boot 3 happens in stages: dependencies and build first, then modules, reusing almost all of the domain.

Java was the choice for many enterprise systems: ERPs, portals, banking and government applications. Much of it still runs on Java 8 or earlier, with era-defining frameworks such as Struts, JSF and EJB, on servers like WebLogic or JBoss.

The risks of standing still

  • Libraries with public vulnerabilities. Log4j, old Struts and Apache Commons versions had severe flaws exploited at scale.
  • Expensive application servers that are hard to configure.
  • Fragile builds. Projects often only compile on one person’s machine.
  • Connections opened and never closed, taking the server down over time.

What can be reused

In Java, the domain is usually reasonably separated from the UI: entities, rules and services. That’s why reuse is high. What changes is the “shell”: web framework, dependency injection, configuration and deployment.

The step-by-step path

  1. Reproducible build. Maven or Gradle that compiles on any machine and in a CI pipeline.
  2. Dependencies. Libraries with known vulnerabilities are upgraded first, because they’re an immediate risk.
  3. Intermediate versions. Java 8 → 11 → 17 → 21, fixing what breaks at each step, with tests.
  4. Spring Boot 3 replacing the application server, with container deployments.
  5. JSF or JSP screens migrated module by module to a modern UI consuming REST APIs.

Watch out for Jakarta EE

Starting with Spring Boot 3, javax.* packages became jakarta.*. It’s a mechanical change, but it touches the whole project and needs tests so it doesn’t hide problems.

If security is your biggest concern, start with the most common legacy security flaws.

Frequently asked questions

Should I jump straight from Java 8 to 21?

You can plan for 21 as the destination, but execution usually goes through the intermediate versions to isolate what breaks at each one.

Do I have to drop WebLogic or JBoss?

It’s not mandatory, but Spring Boot with an embedded server simplifies deployment, lowers cost and makes containers easy.

What if the system has no tests?

That’s the most common case. Before changing anything, we write tests for the current behavior of critical parts so nothing changes by accident.

Fortes Tech Modernization

Java system stuck in the past?

We assess dependencies, build and modules and map the route to Java 21 without stopping operations.

Step-by-step modernization: fixed-price assessment
Message on WhatsApp