The following sections guide you through the process of modernizing the sample Java application asset-manager to Azure using GitHub Copilot app modernization.
- Prerequisites
- Install GitHub Copilot app modernization
- Assess Your Java Application
- Upgrade Runtime & Frameworks
- Expose health endpoints using Custom Skills
- Containerize Applications
- A GitHub account with GitHub Copilot enabled. A Pro, Pro+, Business, or Enterprise plan is required.
- One of the following IDEs:
- The latest version of Visual Studio Code. Must be version 1.101 or later.
- GitHub Copilot in Visual Studio Code. For setup instructions, see Set up GitHub Copilot in Visual Studio Code. Be sure to sign in to your GitHub account within Visual Studio Code.
- GitHub Copilot app modernization. Restart Visual Studio Code after installation.
- The latest version of IntelliJ IDEA. Must be version 2023.3 or later.
- GitHub Copilot. Must be version 1.5.59 or later. For more instructions, see Set up GitHub Copilot in IntelliJ IDEA. Be sure to sign in to your GitHub account within IntelliJ IDEA.
- GitHub Copilot app modernization. Restart IntelliJ IDEA after installation. If you don't have GitHub Copilot installed, you can install GitHub Copilot app modernization directly.
- For more efficient use of Copilot in app modernization: in the IntelliJ IDEA settings, select the Tools > GitHub Copilot configuration window, and then select Auto-approve and Trust MCP Tool Annotations. For more information, see Configure settings for GitHub Copilot app modernization to optimize the experience for IntelliJ.
- The latest version of Visual Studio Code. Must be version 1.101 or later.
- Java JDK for both the source and target JDK versions.
- Maven or Gradle to build Java projects.
- A Git-managed Java project using Maven or Gradle.
- For Maven-based projects: access to the public Maven Central repository.
- In the Visual Studio Code settings, make sure
chat.extensionTools.enabledis set totrue. This setting might be controlled by your organization.
Note: If you're using Gradle, only the Gradle wrapper version 5+ is supported. The Kotlin Domain Specific Language (DSL) isn't supported.
The function
My Tasksisn't supported yet for IntelliJ IDEA.
git clone https://github.com/copilot-dev-days/appmod-workshop-java.git
cd appmod-workshop-javaIn VSCode, open the Extensions view from the Activity Bar, search for the GitHub Copilot app modernization extension in the marketplace. Click the Install button for the extension. After installation completes, you should see a notification in the bottom-right corner of VSCode confirming success.
Alternative: IntelliJ IDEA
Alternatively, you can use IntelliJ IDEA. Open File > Settings (or IntelliJ IDEA > Preferences on macOS), navigate to Plugins > Marketplace, search for GitHub Copilot app modernization, and click Install. Restart IntelliJ IDEA if prompted.
The first step is to assess the sample Java application asset-manager. The assessment provides insights into the application's readiness for migration to Azure.
-
Open VS Code with all the prerequisites installed for the asset manager by changing the directory to the
asset-managerdirectory and runningcode .in that directory. -
In the Activity sidebar, open the GitHub Copilot app modernization extension pane.
-
In the QUICKSTART section, click Start Assessment to trigger the app assessment.
-
Wait for the assessment to be completed. This step could take several minutes.
-
Upon completion, an Assessment Report tab opens. This report provides a categorized view of cloud readiness issues and recommended solutions. Select the Issues tab to view proposed solutions and proceed with migration steps.
-
In the Java Upgrade table at the bottom of the Issues tab, click the Run Task button of the first entry Java Version Upgrade.
-
After clicking the Run Task button, the Copilot Chat panel will open with Agent Mode. The agent will check out a new branch and start upgrading the JDK version and Spring/Spring Boot framework. Click Allow for any requests from the agent.
Note: The upgrading tool also supports upgrading to JDK 25 (the latest LTS version). To do this, click on the generated chat message, edit the target Java version to 25, and then click Send to apply the change.
In this section, you will use custom skills to expose health endpoints for your applications instead of writing code yourself. The following steps demonstrate how to create a custom skill with references and proper prompts.
Note: Custom skills (My Skills) are not supported for the IntelliJ IDEA plugin. If you are using IntelliJ IDEA, you can skip this section.
-
In the Activity sidebar, open the GitHub Copilot app modernization extension pane. Hover over the TASKS section, and then select Create a Custom Skill.
-
A Create a Skill form opens with the following fields. Fill them in as shown below:
- Skill Name:
expose-health-endpoint - Skill Description:
This skill helps add Spring Boot Actuator health endpoints for Azure Container Apps deployment readiness. - Skill Content:
You are a Spring Boot developer assistant, follow the Spring Boot Actuator documentation to add basic health endpoints for Azure Container Apps deployment.
- Skill Name:
-
Click Add Resources to add the Spring Boot Actuator official documentation as a resource. Paste the following link:
https://docs.spring.io/spring-boot/reference/actuator/endpoints.html. -
Click Save to create the skill. Your custom skill now appears in the TASKS > My Skills section.
-
Click Run to execute it.
-
The Copilot chat window opens in Agent Mode and automatically generates the migration plan, checks out a new branch, performs code changes, and runs the validation and fix iteration loop. Click Allow for any tool call requests from the agent.
-
Review the proposed code changes and click Keep to apply them.
Now that you have completed the upgrade and health endpoint steps, the next step is to prepare your application for cloud deployment by containerizing both the web and worker modules. In this section, you will use Containerization Tasks to containerize your applications.
-
In the Activity sidebar, open the GitHub Copilot app modernization extension pane. In the TASKS section, expand Common Tasks > Containerize Tasks and click the run button for Containerize Application.
-
A predefined prompt will be populated in the Copilot Chat panel with Agent Mode. Copilot Agent will start to analyze the workspace and to create a containerization-plan.copiotmd with the containerization plan.
-
View the plan and collaborate with Copilot Agent as it follows the Execution Steps in the plan by clicking Continue/Allow in pop-up chat notifications to run commands. Some of the execution steps leverage agentic tools of Container Assist.
-
Copilot Agent will help generate Dockerfile, build Docker images and fix build errors if there are any. Click Keep to apply the generated code.





