agentleFS
GitHubKnown publishergithub/awesome-copilot/skills/spring-boot-4-migration/SKILL.md

spring-boot-4-migration

Skill41k starsChanged 20 days agoMITView on GitHub

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).

  • Reads credentials

1 other project uses a version of this.

Trending

More talk lately.about the whole repository

Dec 2025: 10 mentionsJan 2026: 4 mentionsFeb 2026: 7 mentionsMar 2026: 10 mentionsApr 2026: 6 mentionsMay 2026: 2 mentionsJun 2026: 2 mentionsJul 2026: 2 mentionsAug 2026: 4 mentionsSep 2026: 8 mentionsOct 2026: 5 mentionsNov 2026: 1 mention
Dec 2025Jun 2026Nov 2026
Mentions a month of the github/awesome-copilot repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about github/awesome-copilot

The biggest 5 of 86 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 86

Talked about on Bluesky, GitHub, YouTube, Hacker News and the web (86 times).

On Bluesky · 41

36 more on Bluesky

On GitHub · 34

29 more on GitHub

On YouTube · 5

On the web · 1

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never read or print secrets (.env, credentials, tokens in properties files).

    line 12
  2. Distinctive:

    Check the official sources when unsure: the Spring Boot 4.0 Migration Guide on the Spring Boot GitHub wiki and the release notes on …

    line 15
  3. Distinctive:

    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 …

    line 24
  4. Very specific:

    Baseline: run the full build and tests (./mvnw verify or ./gradlew build) and record failures that exist before migration.

    line 25
  5. Very specific:

    Gradle Kotlin DSL: update the plugin version in plugins {} or the version catalog.

    line 40
  6. Distinctive:

    Keep the Spring Boot version in a single place (parent, BOM property, or version catalog entry).

    line 41
  7. Very specific:

    Use OpenRewrite (org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0, …

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.
  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. 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 and Kotlin/Java build config.
    3. Jackson 3 (new tools.jackson packages): Jackson 3. A temporary Jackson 2 compatibility module exists; plan to remove it.
    4. Core framework (JSpecify nullability, package relocations, logging, DevTools, PropertyMapper): core framework.
    5. Configuration properties (MongoDB, Spring Session, persistence, Kafka retry): configuration properties. 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.
    7. Tests (Mockito/@MockBean replacement, @SpringBootTest changes, @PropertyMapping): testing.
    8. Actuator and observability modules, health probes: actuator and observability.
  5. Verify with the checklist, pitfalls and resources: 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

FileTopic
01-prerequisites.mdMinimum versions, pre-migration steps
02-starters-and-removed-features.mdModular starters, renamed starters, removed servers/features
03-jackson-3.mdJackson 3 packages, renames, compatibility module
04-core-framework.mdJSpecify, package moves, logging, DevTools, PropertyMapper
05-build-and-dependencies.mdGradle plugin, Spring Retry, Authorization Server, Elasticsearch, Hibernate
06-configuration-properties.mdRenamed and restructured properties
07-web-and-messaging.mdWeb framework, Kafka, RabbitMQ changes
08-testing.mdTest framework changes
09-actuator-and-observability.mdActuator, Micrometer and OpenTelemetry modules
10-kotlin-and-java-build-config.mdKotlin compiler and Java preview configuration
11-checklist-pitfalls-resources.mdFinal 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.

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 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 and the Testcontainers 2 migration notes.
  • kotlin-springboot (Kotlin specifics): see Kotlin and Java build config.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.