AgentSkillsCN

spring-boot-migration

将 Spring Boot 2.x 应用程序迁移到 Spring Boot 3.x。当您需要更新 pom.xml 版本、移除已弃用的 JAXB 依赖、将 Java 升级至 17/21,或使用 OpenRewrite 实现自动化迁移时,可使用此技能。内容涵盖依赖更新、版本变更,以及迁移 checklist。

SKILL.md
--- frontmatter
name: spring-boot-migration
description: Migrate Spring Boot 2.x applications to Spring Boot 3.x. Use when updating pom.xml versions, removing deprecated JAXB dependencies, upgrading Java to 17/21, or using OpenRewrite for automated migration. Covers dependency updates, version changes, and migration checklist.

Spring Boot 2 to 3 Migration Skill

Overview

This skill provides guidance for migrating Spring Boot applications from version 2.x to 3.x, which is one of the most significant upgrades in Spring Boot history due to the Java EE to Jakarta EE transition.

Dependencies to REMOVE from pom.xml

xml
<!-- REMOVE ALL OF THESE - they are incompatible with Spring Boot 3 -->

<!-- Old JAXB API - MUST BE REMOVED -->
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
</dependency>

<!-- Old JAXB Implementation - MUST BE REMOVED -->
<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
</dependency>

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-core</artifactId>
</dependency>

<!-- Old Java Activation - MUST BE REMOVED -->
<dependency>
    <groupId>javax.activation</groupId>
    <artifactId>activation</artifactId>
</dependency>

<dependency>
    <groupId>javax.activation</groupId>
    <artifactId>javax.activation-api</artifactId>
</dependency>