К основному содержанию
скилл CX Codex официальный · GitHub

spring-boot-4-migration — скилл для GitHub Copilot: миграция

Скилл spring-boot-4-migration для GitHub Copilot переносит приложение со Spring Boot 3.x на 4.0. Запускается для миграции, разбора вызванных ею ошибок сборки и тестов или проверки уже выполненного перехода.

MIT ★ 41 430 обновлён 2026-10-23

Установить в GitHub Copilot · GitHub CLI Все способы и платформы ↓
gh skill install github/awesome-copilot skills/spring-boot-4-migration
Открыть на GitHub

Что делает spring-boot-4-migration

Скилл проводит миграцию приложения со Spring Boot 3.x на 4.0 по шагам: сначала проверяет версии и состояние проекта, затем обновляет зависимости и разбирает изменения в стартерах, Jackson, конфигурации, веб-слое и тестах. Он охватывает Maven и Gradle, включая Kotlin DSL и version catalogs.

Перед переходом с версии ниже 3.5 нужно сначала обновиться до последней 3.5.x и пройти тесты. Для Boot 4 требуется Java 17 или новее. Скилл предлагает собирать проект и запускать тесты после каждого изменения, а завершить миграцию проверкой запуска, Actuator и основных эндпоинтов.

Справочные файлы разбиты по темам и загружаются по мере работы. Скилл запрещает читать секреты из .env и файлов с учётными данными. Он предназначен для явного перехода с 3.x на 4.0, а не для патч-обновлений 3.x или перехода с 4.0 на 4.1.

Какие задачи решает

  • перенести приложение со Spring Boot 3.x на 4.0
  • найти причины ошибок сборки после обновления
  • разобрать сбои тестов после миграции
  • проверить изменения в стартерах и конфигурации

Примеры запросов агенту

  • Перенеси мой проект со Spring Boot 3.x на 4.0 и исправляй ошибки по шагам.
  • Разбери ошибки сборки и тестов после перехода на Spring Boot 4.0.
  • Проверь миграцию проекта на Spring Boot 4.0 по итоговому чек-листу.

Как установить spring-boot-4-migration

1GitHub CLI

gh skill install github/awesome-copilot skills/spring-boot-4-migration

2Вручную: положить файлы

.github/skills/spring-boot-4-migration/SKILL.md

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о spring-boot-4-migration

Как установить spring-boot-4-migration в GitHub Copilot?

Выполни gh skill install github/awesome-copilot skills/spring-boot-4-migration. Файл скилла появится в .github/skills/spring-boot-4-migration/SKILL.md.

Что делает spring-boot-4-migration?

Помогает переносить приложения со Spring Boot 3.x на 4.0, разбирать связанные с переходом ошибки сборки и тестов и проверять миграцию. Поддерживает Maven и Gradle.

Какая версия Java нужна для spring-boot-4-migration?

Для Spring Boot 4 нужна Java 17 или новее. Перед переходом с версии ниже 3.5 сначала требуется обновление до последней 3.5.x.

Исходный текст

SKILL.md · MIT
---
name: spring-boot-4-migration
description: 'Migrate a Spring Boot 3.x application to Spring Boot 4.0 (Spring Framework 7, Jackson 3, modular starters, JSpecify). Use only for an explicit Boot 3.x to 4 migration, or to fix build or test failures caused by it, or to review one. Not for 3.x patch bumps or 4.0 to 4.1 upgrades; follow the target Boot version release notes and upgrade guide for those. Covers Maven and Gradle (Kotlin DSL, version catalogs).'
---

# Spring Boot 3.x to 4.0 Migration

Step-by-step migration workflow. Topic details live in `references/`; load only the files relevant to the current step.

## Rules

- Never read or print secrets (`.env`, credentials, tokens in properties files).
- Change one thing per step and run the test suite after each step; commit nothing you cannot build.
- Pin versions explicitly; never use `latest` or open-ended ranges.
- Check the official sources when unsure: the Spring Boot 4.0 Migration Guide on the Spring Boot GitHub wiki and the release notes on spring.io.

## Workflow

1. **Detect the current state**
   - Boot version: `pom.xml` (`spring-boot-starter-parent` / BOM version), `build.gradle(.kts)` (`org.springframework.boot` plugin), or `gradle/libs.versions.toml`.
   - Build tool: `pom.xml` + `mvnw` means Maven; `build.gradle.kts` / `build.gradle` means Gradle (Kotlin or Groovy DSL). Use the project wrapper (`./mvnw`, `./gradlew`).
   - Java version (Boot 4 needs Java 17+, Java 25 recommended), Kotlin version, and key libraries (Jackson, Hibernate, Security, Kafka, Elasticsearch, MongoDB).
   - See [prerequisites](references/01-prerequisites.md).
2. **Migrate to the latest 3.5.x first.** If the project is older than 3.5, upgrade to the latest 3.5.x, fix deprecation warnings, and get the tests green before touching 4.0. Never jump from 3.2 straight to 4.0.
3. **Baseline**: run the full build and tests (`./mvnw verify` or `./gradlew build`) and record failures that exist before migration.
4. **Bump to 4.0.x** (parent/BOM or plugin version) and fix the build in this order, running the build after each item:
   1. Starters and modules: [starters and removed features](references/02-starters-and-removed-features.md). Choose either the classic starters or the new modular ones; Boot 4 split the auto-configuration into many modules, and each technology now has its own `*-test` starter.
   2. Build files and third-party dependencies: [build and dependencies](references/05-build-and-dependencies.md) and [Kotlin/Java build config](references/10-kotlin-and-java-build-config.md).
   3. Jackson 3 (new `tools.jackson` packages): [Jackson 3](references/03-jackson-3.md). A temporary Jackson 2 compatibility module exists; plan to remove it.
   4. Core framework (JSpecify nullability, package relocations, logging, DevTools, `PropertyMapper`): [core framework](references/04-core-framework.md).
   5. Configuration properties (MongoDB, Spring Session, persistence, Kafka retry): [configuration properties](references/06-configuration-properties.md). Add `spring-boot-properties-migrator` temporarily to find renamed keys, and remove it afterwards.
   6. Web and messaging changes (trailing slash matching, `HttpMessageConverters`, Jersey, Kafka, RabbitMQ): [web and messaging](references/07-web-and-messaging.md).
   7. Tests (Mockito/`@MockBean` replacement, `@SpringBootTest` changes, `@PropertyMapping`): [testing](references/08-testing.md).
   8. Actuator and observability modules, health probes: [actuator and observability](references/09-actuator-and-observability.md).
5. **Verify** with the [checklist, pitfalls and resources](references/11-checklist-pitfalls-resources.md): full build, tests, startup, actuator health, a smoke test of the main endpoints, and native image build if used.

## Build tool notes

- **Maven**: change the parent (or `spring-boot-dependencies` BOM) version, then swap starters in `<dependencies>`. Use `./mvnw dependency:tree` to find stale transitive Jackson 2, Undertow, or Spring Retry usage. The reference files show Gradle snippets; translate the coordinates directly to Maven `<dependency>` entries.
- **Gradle Kotlin DSL**: update the plugin version in `plugins {}` or the version catalog; use `./gradlew dependencies --configuration runtimeClasspath` to inspect resolution.
- Keep the Spring Boot version in a single place (parent, BOM property, or version catalog entry).

## Reference files

| File | Topic |
|---|---|
| [01-prerequisites.md](references/01-prerequisites.md) | Minimum versions, pre-migration steps |
| [02-starters-and-removed-features.md](references/02-starters-and-removed-features.md) | Modular starters, renamed starters, removed servers/features |
| [03-jackson-3.md](references/03-jackson-3.md) | Jackson 3 packages, renames, compatibility module |
| [04-core-framework.md](references/04-core-framework.md) | JSpecify, package moves, logging, DevTools, PropertyMapper |
| [05-build-and-dependencies.md](references/05-build-and-dependencies.md) | Gradle plugin, Spring Retry, Authorization Server, Elasticsearch, Hibernate |
| [06-configuration-properties.md](references/06-configuration-properties.md) | Renamed and restructured properties |
| [07-web-and-messaging.md](references/07-web-and-messaging.md) | Web framework, Kafka, RabbitMQ changes |
| [08-testing.md](references/08-testing.md) | Test framework changes |
| [09-actuator-and-observability.md](references/09-actuator-and-observability.md) | Actuator, Micrometer and OpenTelemetry modules |
| [10-kotlin-and-java-build-config.md](references/10-kotlin-and-java-build-config.md) | Kotlin compiler and Java preview configuration |
| [11-checklist-pitfalls-resources.md](references/11-checklist-pitfalls-resources.md) | Final checklist, pitfalls, links |

## Automation

Use OpenRewrite (`org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0`, <https://docs.openrewrite.org/recipes/java/spring/boot4/upgradespringboot_4_0-community-edition>) when available, review the diff, and always fetch the version-specific official guide before editing.

## Upstream sources (read before migrating)

Fetch the page for the target version; prefer it over this skill when they conflict.

- Boot 4.0 Migration Guide: <https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide>
- Boot 4.0 Release Notes: <https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Release-Notes>
- Upgrading Spring Boot (incl. `spring-boot-properties-migrator`): <https://docs.spring.io/spring-boot/upgrading.html>
- System requirements: <https://docs.spring.io/spring-boot/system-requirements.html>
- Boot releases: <https://github.com/spring-projects/spring-boot/releases>
- Spring Framework 7: <https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-7.x>, <https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Framework-7.x>
- Spring Security 7: <https://docs.spring.io/spring-security/reference/migration/index.html>
- Spring Data 2025.1: <https://github.com/spring-projects/spring-data-commons/wiki/Spring-Data-2025.1-Release-Notes>
- Spring Batch 6: <https://docs.spring.io/spring-batch/reference/whatsnew.html>
- Hibernate ORM 7: <https://docs.hibernate.org/orm/7.0/migration-guide/>
- Jackson 3: <https://github.com/FasterXML/jackson/blob/main/jackson3/MIGRATING_TO_JACKSON_3.md>
- Micrometer: <https://github.com/micrometer-metrics/micrometer/wiki/Migration-Guide>

For Boot 3.x patch bumps or Boot 4.0 to 4.1 upgrades, go directly to the target Boot version's release notes and upgrade guide using the official links above. These are dependency upgrades, not JDK migrations; do not route them to `java-upgrade`.

Related skills, each only if installed (otherwise use the fallback in parentheses):
- `spring-security` (Security 7 changes): fall back to the Spring Security 7 migration guide above.
- `spring-observability`: fall back to [actuator and observability](references/09-actuator-and-observability.md) and the Micrometer guide above.
- `java-hibernate-jpa`: fall back to the Hibernate ORM 7 migration guide above.
- `java-upgrade` (only when a JDK upgrade is explicitly requested): fall back to the target JDK's official migration guide.
- `java-diagnostics` (runtime or startup failures): read the full stack trace and `mvn dependency:tree` / `gradle dependencies` output yourself.
- `java-testcontainers` (Testcontainers 2.0 tests): see [testing](references/08-testing.md) and the Testcontainers 2 migration notes.
- `kotlin-springboot` (Kotlin specifics): see [Kotlin and Java build config](references/10-kotlin-and-java-build-config.md).

© github · MIT · github/awesome-copilot

Похожие скиллы

Все скиллы по теме «Бэкенд и API» →
305-frameworks-spring-boot-modulith Juan Antonio Breña Moral Скилл 305-frameworks-spring-boot-modulith для Claude Code проектирует и проверяет модульные монолиты на Spring Modulith в приложениях Spring Boot. Помогает задавать границы модулей, работать с событиями и тестировать архитектуру. CX Codex +1 245установок spring-boot-project-creator giuseppe-trisciuoglio Скилл spring-boot-project-creator для Claude Code автоматизирует создание проектов Spring Boot 3.x/4.x через Spring Initializr с выбором архитектуры DDD или слоистой, настройкой JPA, OpenAPI и сервисов Docker Compose. CX Codex +1 3 700установок spring-boot Mindrally Задаёт агенту стиль кода на Spring Boot: REST-контроллеры, тесты, безопасность, сборка и деплой. Обеспечивает единообразие в проектах на Java. CX Codex +1 881установок 301-frameworks-spring-boot-core Juan Antonio Breña Moral Скилл 301-frameworks-spring-boot-core настраивает правила ревью и рефакторинга кода на Spring Boot 4.0.x. Помогает внедрять зависимости через конструктор и валидировать конфигурацию. CX Codex +1 421установок java-migration decebals Скилл java-migration для Claude Code ведёт проект по цепочке LTS-версий Java: от оценки текущего состояния до правки сборки и тестов. Переводит легаси на Java 21 или 25. CX Codex +1 372установок spring-boot-dependency-injection giuseppe-trisciuoglio Скилл spring-boot-dependency-injection внедряет паттерны внедрения зависимостей через конструктор в Spring Boot. Он помогает избавиться от field injection и настроить выбор бинов через @Primary и @Qualifier. CX Codex +1 4 000установок

Из того же набора993

Весь набор →
java-debugging Скилл java-debugging для GitHub Copilot ведёт агента по методике поиска причины бага в Java: воспроизвести, сузить, проверить гипотезу, подключить отладчик. Использует логи и логпоинты вместо брейкпоинтов. CX Codex +1 1установок supabase-rls-policies Скилл supabase-rls-policies для GitHub Copilot помогает писать, проверять и тестировать политики Row Level Security в Supabase. Запускается при создании таблиц, правке миграций и настройке изоляции пользователей. CX Codex +1 ★ 41 430звёзд репо spring-security Помогает настраивать, тестировать и проверять Spring Security. Подключается при добавлении или аудите аутентификации и авторизации в приложении Spring Boot. CX Codex +1 ★ 41 430звёзд репо spring-observability Скилл spring-observability для GitHub Copilot настраивает наблюдаемость в сервисах на Spring Boot 3 и 4. Включается при добавлении метрик Micrometer, трассировки OpenTelemetry и структурированных логов с Actuator. CX Codex +1 ★ 41 430звёзд репо skill-distribution-audit Скилл skill-distribution-audit для GitHub Copilot проверяет репозитории со скиллами перед релизом. Сверяет исходные файлы с манифестом дистрибуции и реальной поисковой выдачей клиента. CX Codex +1 ★ 41 430звёзд репо scout-issue Скилл scout-issue для GitHub Copilot подбирает GitHub issues для вклада в открытые проекты. Он спрашивает об опыте, навыках, времени и типе вклада, затем ранжирует подходящие задачи. CX Codex +1 ★ 41 430звёзд репо sap-cloud-integration Помогает писать и разбирать iFlow в SAP Cloud Integration. Срабатывает при работе с CPI-скриптами Groovy, настройками обмена и ошибками адаптеров. CX Codex +1 ★ 41 430звёзд репо pr-artifact-explorer Скилл pr-artifact-explorer для GitHub Copilot открывает GitHub PR, issues, запуски workflow, Actions-артефакты и веб-превью в общей панели. Он включается по запросу показать или изучить эти материалы. CX Codex +1 ★ 41 430звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой