Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article shows you how to use GitHub Copilot App Modernization – upgrade for Java to upgrade a framework or third-party dependency without requiring a JDK runtime upgrade.
Initiate a framework upgrade
To initiate this type of upgrade, you can start a prompt in agent mode. For example:
upgrade this Java project to Spring Boot 3.2
Handle compatibility
If your current JDK version is compatible with the specified Spring Boot version - for example, JDK 17+ for Spring Boot 3.2 - the tool performs a framework-only upgrade. Both the source and target JDK versions remain the same and the target Spring Boot version is set according to your initial prompt.
If your current JDK version isn't compatible with the target framework version - for example, when upgrading from JDK 8 to Spring Boot 3.2 - the tool automatically upgrades the JDK to the minimum supported version required by the framework - in this case, JDK 17 - in addition to performing the framework upgrade.
Upgrade third-party libraries
You can also use a similar prompt to upgrade a third-party library. For example:
use the java upgrade tools to upgrade "com.google.inject.guice" to 6.0.0 in this java project
When you initiate a prompt to upgrade a specific third-party library - for example, Upgrade com.google.inject.guide to version 3.17.0
- GitHub Copilot analyzes the current project and generates an upgrade plan focused solely on updating the requested dependency.
What Copilot does during the upgrade
As part of this process, Copilot might perform the following tasks:
- Modify code or configuration files to ensure compatibility with the new library version.
- Perform build validation to confirm the project compiles successfully.
- Run CVE checks to detect and surface any security issues.
- Execute test validation to ensure no new test failures are introduced.
This targeted upgrade flow enables you to modernize dependencies with transparency and control.