Token导航 LogoToken导航

Agent Skill · 研究检索

spring-boot-4-migration(Spring Boot 4 迁移)

用于辅助 Java 项目开发、面向对象设计、Spring 生态、Maven 或 Gradle 依赖和后端工程实践。它适合让 Agent 分析类结构、设计接口、整理服务分层、生成测试或检查常见代码坏味道。使用时需要结合项目已有架构、包结构和依赖版本,不应只按通用教程改代码;涉及数据库、事务、并发或框架配置时,应先确认运行环境和回归测试范围。

spring-boot-4-migration 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 63,891。

总安装 309周安装 13GitHub Stars 35下载 108核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:spring-boot-4-migration(Spring Boot 4 迁移)
来源仓库:https://github.com/adityamparikh/spring-boot-4-migration-skill
仓库路径:skills/spring-boot-4-migration
安装命令:
npx skills add https://github.com/adityamparikh/spring-boot-4-migration-skill --skill spring-boot-4-migration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/adityamparikh/spring-boot-4-migration-skill --skill spring-boot-4-migration

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

帮助将现有 Spring Boot 项目平滑升级到 4.x 版本的迁移工具集。适用于需要适配 Jakarta EE 命名空间与移除过时 API 的项目。提供自动化检测脚本与渐进式重构步骤建议。spring-boot-4-migration 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

重大 API 变更处需人工复核替换方案的正确性。迁移后务必运行完整回归测试套件保障功能完整性。

来源仓库内路径:skills/spring-boot-4-migration

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/adityamparikh/spring-boot-4-migration-skill --…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

spring-boot-4-migration 怎么安装?

在终端执行 npx skills add https://github.com/adityamparikh/spring-boot-4-migration-skill --skill spri…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

spring-boot-4-migration 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

spring-boot-4-migration 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

spring-boot-4-migration 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

spring-boot-4-migration 用的人多吗?

公开数据是累计安装 309 次,近一周安装 13 次,下载 108 次,GitHub 35 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

spring-boot-4-migration 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
spring-boot-4-migration

Spring Boot 4 迁移 · 本页

30935调用外部服务未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Spring Boot 4 Migration Skill

Migrate Spring Boot 3.x applications to 4.x and stay current across minor versions with zero guesswork.

Scope: 3.x → 4.0 and 4.x Minor Versions

This skill covers two scenarios:

  1. Major migration (3.x → 4.0): The bulk of this skill — all 9 phases, the gradual upgrade strategy, and the bridge system.
  2. Minor version upgrades (4.0 → 4.1, 4.1 → 4.2, etc.): Tracked in references/minor-version-changes.md. Minor versions may deprecate APIs, remove compatibility bridges, change defaults, and introduce new features. Check that file before bumping to any new 4.x minor version.

Verify Library and Framework Usage

The model's training data has a knowledge cutoff. During migration, actively verify that APIs, configurations, and patterns are current for the target Spring Boot version:

  1. Identify versions — Check pom.xml or build.gradle.kts to determine the exact versions of Spring Boot, Spring Framework, and all key dependencies (both source and target).
  2. Look up current documentation — Use Context7 (mcp__claude_ai_Context7__resolve-library-id then mcp__claude_ai_Context7__query-docs) to retrieve up-to-date documentation for any library or framework where:

- The version is newer than what the model may have been trained on - You are unsure whether an API, configuration property, or pattern is still valid or has been deprecated/replaced - The migration involves advanced or less common features of a library

  1. Search the web — Use WebSearch and WebFetch to check for:

- Breaking changes or migration guides for the specific version in use - Known security vulnerabilities (CVEs) in the dependency versions - Deprecated APIs that have been replaced in newer versions - Community-reported migration issues and workarounds

  1. Check GitHub — Use gh CLI to check release notes, changelogs, or issues for dependencies when needed (e.g., gh api repos/spring-projects/spring-boot/releases/latest)

Do not assume that an API or pattern is correct based solely on model knowledge. When in doubt, look it up. This is especially critical during major version migrations where many APIs change.

Toolchain Version Check (Do This First)

Before starting any migration, detect the project's current Java, Kotlin, Maven, and Gradle versions. If any are below the minimum supported versions, upgrade them BEFORE proceeding with the Spring Boot migration.

Minimum supported versions for Spring Boot 4.x:

ToolMinimumRecommendedHow to check
Java1721+ (25 supported)java -version or javac -version
Kotlin2.22.2.x (latest)Check kotlin.version in build file or kotlinc -version
Maven3.6.33.9.x+mvn -version or ./mvnw -version
Gradle8.149.xgradle -version or ./gradlew -version

If older versions are detected:

  • Java < 17: Upgrade JDK before anything else. Boot 4 will not compile. Install JDK 21 (LTS, recommended) or JDK 17 (minimum). Update JAVA_HOME, sourceCompatibility/targetCompatibility (Gradle), or <maven.compiler.source>/<maven.compiler.target> (Maven).
  • Kotlin < 2.2: Update kotlin.version property in your build file to 2.2.x. Spring Boot 4 requires Kotlin 2.2 baseline for JSpecify null-safety support. If upgrading from Kotlin 1.x, review the Kotlin 2.0 migration guide first.
  • Maven < 3.6.3: Upgrade Maven wrapper: mvn wrapper:wrapper -Dmaven=3.9.9 or download a newer distribution. Older Maven versions may fail to resolve Boot 4 dependencies or run the Boot Maven plugin.
  • Gradle < 8.14: Upgrade Gradle wrapper: ./gradlew wrapper --gradle-version=9.0 (or 8.14 minimum). Older Gradle versions are not supported by the Spring Boot 4 Gradle plugin.

Action: Run the version checks above. Resolve any version gaps, then confirm the project still compiles and tests pass before continuing.

Prerequisites

For 3.x → 4.0 migration:

  • Toolchain versions meet minimums (see Toolchain Version Check above)
  • Source project compiles and tests pass on Spring Boot 3.5.x (latest patch)
  • Java 17+ is available (Java 21+ recommended, Java 25 supported)
  • All deprecated API calls from Boot 3.x are resolved where possible
  • If on Boot 3.4 or earlier, first upgrade to 3.5.x before proceeding

For 4.x → 4.y minor version upgrade:

  • Project is on the latest patch of the current minor version (e.g., 4.0.x latest)
  • Review references/minor-version-changes.md for the target version
  • Check the official release notes for the target version
  • Resolve any deprecation warnings from the current version

Choose Your Migration Strategy

Strategy 1 — Gradual Upgrade (Recommended for enterprise/large codebases) Read references/gradual-upgrade-strategy.md FIRST. This models migration as a dependency graph: a Day-1 baseline using compatibility bridges, then 6 independent tracks (Starters, Jackson 3, Properties, Security, Testing, Framework 7) completed at your own pace. Key bridges:

  • spring-boot-starter-classic — restores 3.x monolithic auto-configuration
  • spring-boot-jackson2 — keeps Jackson 2 code working alongside Boot 4
  • spring-security-access — bridges legacy AccessDecisionManager/Voter Use this when: multiple teams, many services, phased rollouts, or when complete Jackson 3 / Security 7 migration will take more than one sprint.

Strategy 2 — All-at-Once (below) Execute all 9 phases sequentially in one effort. Best for greenfield projects, small codebases, or single-team ownership.

Automated Migration with OpenRewrite

Before doing manual migration, consider using OpenRewrite recipes to automate the mechanical changes. The Moderne platform and OpenRewrite project provide recipes for:

  • Jackson 2 → 3 package/import migration: org.openrewrite.java.jackson.UpgradeJackson_2_3
  • Spring Boot 4.x upgrade: org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_5 (prepare step), then UpgradeSpringBoot_4_0
  • @MockBean → @MockitoBean annotation replacement

Run OpenRewrite FIRST to handle bulk find-replace operations, then use this skill's phases to address the remaining manual changes (Security DSL rewrites, behavioral differences, property semantics, etc.).

See: https://www.moderne.ai/blog/spring-boot-4x-migration-guide

Migration Workflow (All-at-Once)

Execute these phases IN ORDER. Each phase must compile and pass tests before proceeding to the next.

Phase 1: Build File Migration

Update Boot/Framework versions, build plugins, and replace deprecated starters with modular equivalents. Add modular test starters for each technology used in tests. Use classic starters as a stopgap if needed.

Read references/build-and-dependencies.md for complete starter mappings, build plugin changes, and step-by-step instructions.

Compile check: Run mvn compile or gradle compileJava — fix any dependency resolution errors before continuing.

Phase 2: Property Migration

Scan all application.properties, application.yml, profile-specific variants, and @SpringBootTest(properties =...) annotations. Rename changed property keys (Jackson, MongoDB, session, actuator, Hibernate).

Read references/property-changes.md for the complete property mapping.

Phase 3: Jackson 3 Migration

Jackson 3 is the default in Boot 4. Migrate group IDs, packages, and renamed Boot classes (@JsonComponent → @JacksonComponent, etc.). Use spring-boot-jackson2 bridge as a temporary stopgap if needed.

Read references/jackson3-migration.md for complete details.

Phase 4: Package and API Relocations

Fix relocated imports (@EntityScan, BootstrapRegistry, etc.), removed APIs (PropertyMapper.alwaysApplyingNotNull, path matching options), and deprecated converters. Also migrate HTTP client code if applicable.

Read references/api-changes.md for the full list of relocated packages and removed APIs. Also read references/http-clients.md if your project uses RestClient, WebClient, @HttpExchange, or Feign.

Phase 5: Observability Migration

Replace individual Micrometer/OTel dependencies with the consolidated spring-boot-starter-opentelemetry starter, update OTLP properties, and rename observability modules. Actuator is now optional for OTel export.

Read references/observability-migration.md for complete details.

Phase 6: Spring Security 7 Migration

Migrate to Security 7 DSL (lambda-only, no and()), replace removed AuthorizationManager#check, switch to PathPatternRequestMatcher, and update Jackson/SAML integrations. Use spring-security-access bridge if legacy AccessDecisionManager/Voter code cannot migrate immediately.

Read references/spring-security7.md for complete details.

Phase 7: Testing Infrastructure Migration

Replace @MockBean/@SpyBean with @MockitoBean/@MockitoSpyBean (removed, not just deprecated). Add explicit auto-configure annotations for test HTTP clients. Migrate Testcontainers 2 module names/packages and adopt JUnit 6. Add modular test starters for each technology.

Read references/testing-migration.md for complete details.

Phase 8: Spring Framework 7 Specific Changes

Address JSpecify nullability (Kotlin impact), deprecated AntPathMatcher, MVC XML config removal, SpringExtension scope changes, Hibernate 7.1 entity mapping changes, and Spring Retry → Framework core retry migration.

Read references/spring-framework7.md for complete details. Also read references/resilience-migration.md if your project uses Spring Retry, @Retryable, @ConcurrencyLimit, or Resilience4j. Optionally read references/api-versioning.md for new API versioning capabilities introduced in Framework 7.

Phase 9: Final Verification

Run the verification script if available, otherwise manually check:

  1. mvn clean verify or gradle clean build — full compile + tests
  2. Verify application starts: mvn spring-boot:run or gradle bootRun
  3. Check actuator health: curl localhost:8080/actuator/health
  4. Verify liveness/readiness probes (now enabled by default)
  5. Check structured logging output format
  6. Run integration tests against each active Spring profile
  7. Verify Docker image builds if using buildpacks or Jib

Optionally read references/aot-native.md if you plan to adopt AOT processing, GraalVM native images, or the new AOT cache feature.

Minor Version Upgrades (4.0 → 4.1, 4.1 → 4.2, etc.)

When upgrading between Spring Boot 4.x minor versions, follow this process:

1. Check What Changed

Read references/minor-version-changes.md for the target version. Also consult the official release notes:

2. Bridge Removal Awareness

Minor versions are where compatibility bridges get removed. Before upgrading, check whether any bridges you depend on are being dropped:

BridgeIntroducedExpected Removal
spring-boot-jackson24.04.1 or 4.2
spring-boot-starter-classic4.05.0
spring-boot-starter-test-classic4.05.0
Deprecated starter names4.05.0

If you are still using a bridge that is being removed in the target version, complete the corresponding migration track BEFORE upgrading.

3. Upgrade Process

  1. Update the Spring Boot version in your build file to the target minor version's latest patch release.
  2. Run mvn compile / gradle compileJava — fix any new compilation errors.
  3. Run the full test suite — fix any test failures.
  4. Review deprecation warnings in both build output and application logs. These signal what will break in the NEXT minor version.
  5. Run verify_migration.sh to confirm migration state.

4. New Features

Each minor version introduces new features and auto-configurations. These are opt-in and don't require action, but you may want to adopt them. Check the "New and Noteworthy" section of each release's notes.

Troubleshooting

Common Compilation Errors

ErrorCauseFix
ClassNotFoundException:...autoconfigure...Modular starters neededAdd specific spring-boot-starter-X
NoSuchMethodError: PropertyMapper.alwaysApplyingNotNullAPI removedUse always() instead
Cannot resolve symbol JsonComponentRenamedUse @JacksonComponent
Package com.fasterxml.jackson does not existJackson 3 packagesChange to tools.jackson
Cannot resolve symbol MockBeanDeprecated/removedUse @MockitoBean
ClassNotFoundException: RestClientBuilderCustomizerElasticsearch changeUse Rest5ClientBuilderCustomizer

Quick Fixes

  • If build won't compile at all after version bump, use spring-boot-starter-classic and spring-boot-starter-test-classic to get running, then incrementally migrate to modular starters. See references/gradual-upgrade-strategy.md for the full Day-1 baseline.
  • If Jackson 3 migration is blocking, add spring-boot-jackson2 temporarily. This is a first-class bridge — see Track B in the gradual strategy.
  • If Spring Security changes are extensive, add spring-security-access bridge and upgrade to Security 6.5 preparation steps first (they provide opt-out flags for 7.0 breaking changes). See Track D in the gradual strategy.
  • For enterprise rollouts across many services, use the Wave 1-4 approach in references/gradual-upgrade-strategy.md to minimize blast radius.

Reference File Index

FileWhen to read
references/gradual-upgrade-strategy.mdFIRST — migration dependency graph, bridges, independent tracks, enterprise rollout
references/build-and-dependencies.mdPhase 1 / Track A — full starter mapping tables, build plugin changes
references/property-changes.mdPhase 2 / Track C — all property key renames and value changes
references/jackson3-migration.mdPhase 3 / Track B — Jackson 3 packages, APIs, compatibility mode
references/api-changes.mdPhase 4 — package relocations, removed APIs, renamed classes
references/observability-migration.mdPhase 5 — OpenTelemetry starter, OTLP properties, module renames, Actuator decoupling
references/spring-security7.mdPhase 6 / Track D — Security 7 breaking changes and DSL migration
references/testing-migration.mdPhase 7 / Track E — MockBean, Testcontainers 2, JUnit 6, RestTestClient
references/spring-framework7.mdPhase 8 / Track F — Framework 7 changes, JSpecify, path matching
references/http-clients.mdHTTP clients — RestClient, WebClient, @HttpExchange, Feign migration, RestTestClient
references/api-versioning.mdAPI versioning — strategies, semantic ranges, client-side, deprecation, testing
references/resilience-migration.mdResilience — Spring Retry → Framework 7, @Retryable, @ConcurrencyLimit, Resilience4j
references/aot-native.mdAOT/Native — BeanRegistrar, RuntimeHints, Spring Data AOT, GraalVM 25, AOT Cache
references/minor-version-changes.md4.x minor upgrades — changes per minor version, bridge removals, new features
scripts/verify_migration.shPhase 9 — bridge-aware verification with PASS/FAIL/WARN/BRIDGE

Official Sources

Cross-reference with these authoritative resources:

平台分布

Codex

35.04%
按下载量换算38

Claude

30.26%
按下载量换算33

Cursor

18.59%
按下载量换算20

Gemini CLI

9.06%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills