java-upgrade
Skill220 starsChanged 7 days agoMITView on GitHub
Transformation rules and verification steps for upgrading Java 8/11 + Spring Boot 2.x applications to Java 25 + Spring Boot 4.x. WHEN: upgrade Java version, migrate Spring Boot 2 to 3, javax to jakarta, fix CVE in Java dependencies, update Maven/Gradle build for Java 25, Spring Security 5 to 6 migration, Spring Boot 3 to 4 migration. NOT for: greenfield Java services, framework replacement rewrites (Struts/EJB — use dedicated migration rulebooks), infrastructure-only changes.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- github/awesome-copilottheir own version, first seen Oct 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- github/awesome-copilot★ 41ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- 03-Azure/01-04-AI/01_Agentic_SDLC/.github/copilot-instructions.mdCopilot instructions
- 03-Azure/01-04-AI/02_Inventory_Planning_Fabric/.github/copilot-instructions.mdCopilot instructions
- 03-Azure/01-04-AI/03_Inventory_Planning_Agentic/.github/copilot-instructions.mdCopilot instructions
- 03-Azure/01-04-AI/04_Agentic_Contract_Lifecycle_Management/.github/copilot-instructions.mdCopilot instructions
- 03-Azure/01-04-AI/08_Predictive_Maintenance/.github/copilot-instructions.mdCopilot instructions
- 03-Azure/01-04-AI/11_Healthcare_Regulatory_Intelligence/.github/copilot-instructions.mdCopilot instructions
- dotnet-upgradeSkill
- {{skill-name-kebab-case}}Skill
- skill-creatorSkill
- frontend-designSkill
- reconciliationSkill
The file
Files
Java 8 / Spring Boot 2.x → Java 25 / Spring Boot 4.x Upgrade Rules
Purpose
Packages the version-step strategy, API mappings, and verification checklist for a behavior-preserving upgrade to Java 25 + Spring Boot 4.x.
Prerequisites
ASSESSMENT.mdexists and is approved.- Target JDK + compatible Maven installed — verify:
java -version,mvn -version.
Procedure
Step 1 — Upgrade incrementally (never skip)
| Step | From → To | Key risk at this step |
| 1 | Java 8 → 11 | Removed JEE modules (JAXB, JAX-WS) — add explicit deps |
| 2 | Java 11 → 17 | Strong encapsulation of JDK internals (--add-opens smells) |
| 3 | Java 17 → 21 | Mostly safe; check agents/bytecode libs (ASM, CGLIB versions) |
| 4 | Java 21 → 25 | Recheck bytecode/agent libs and build-plugin versions for the new class-file level |
| 5 | Boot 2.x → 2.7 | Deprecation cleanup before the big jump |
| 6 | Boot 2.7 → 3.x | javax → jakarta, Spring Security 6, Hibernate 6 |
| 7 | Boot 3.x → 4.x | APIs deprecated in 3.x are removed — clean up all deprecation warnings first |
mvn -q clean verify # run after EVERY step; fix before proceedingStep 2 — Apply transformation rules (Boot 2.7 → 3.x)
| Source pattern | Target pattern | Notes |
javax.persistence.* / javax.servlet.* / javax.validation.* | jakarta.* | Also grep XML, persistence.xml, reflection strings |
WebSecurityConfigurerAdapter | SecurityFilterChain bean | Spring Security 6 lambda DSL |
antMatchers() | requestMatchers() | Security DSL rename |
spring.factories (auto-config) | AutoConfiguration.imports | New registration file |
httpTrace / deprecated actuator IDs | new actuator endpoint IDs | Check management.endpoints config |
| Hibernate 5 dialects/types | Hibernate 6 equivalents | ID generation defaults changed — verify sequences |
springfox (Swagger) | springdoc-openapi | springfox is incompatible with Boot 3 |
| {{APP_SPECIFIC_RULE_1}} | {{TARGET_1}} | {{NOTE}} |
| {{APP_SPECIFIC_RULE_2}} | {{TARGET_2}} | {{NOTE}} |
Step 3 — Verify
mvn clean verifypasses on the target JDK (Java 25)grep -r "javax\." src/returns only intentional matches (e.g.javax.crypto,javax.sqlstay in the JDK)- App starts; health endpoint returns UP
- CVE assessment clean of criticals (
appmod-cve-assessment) - No
--add-opensworkarounds left without a tracked issue
Common Pitfalls
- ⚠️
javax.survivors outside Java code — XML configs,importstrings in reflection, SPI files. The compiler won't save you; grep everything. - ⚠️ Hibernate 6 sequence allocation changes — verify generated IDs against existing DB sequences before deploying.
- ⚠️ Lombok/annotation processors need versions matching the new JDK — upgrade build plugins (
maven-compiler-plugin≥ 3.11) first. - ⚠️ Trailing-slash matching changed in Spring 6 —
/api/foo/no longer matches/api/fooby default. - ⚠️ {{APP_SPECIFIC_PITFALL}}
References
- Spring Boot 3.x and 4.x migration guides; Spring Security 6 migration guide
- OpenRewrite recipes:
org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_x - appmod assessment report (linked from
ASSESSMENT.md)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

