github/awesome-copilot / skills/spring-boot-4-migration
spring-boot-4-migration
VerifiedMigrate 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).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.4 KB |
| references/01-prerequisites.md | markdown | 1.9 KB |
| references/02-starters-and-removed-features.md | markdown | 9.6 KB |
| references/03-jackson-3.md | markdown | 4.2 KB |
| references/04-core-framework.md | markdown | 4.2 KB |
| references/05-build-and-dependencies.md | markdown | 6.2 KB |
| references/06-configuration-properties.md | markdown | 3.0 KB |
| references/07-web-and-messaging.md | markdown | 7.3 KB |
| references/08-testing.md | markdown | 6.0 KB |
| references/09-actuator-and-observability.md | markdown | 2.7 KB |
| references/10-kotlin-and-java-build-config.md | markdown | 1.3 KB |
| references/11-checklist-pitfalls-resources.md | markdown | 5.9 KB |
references/06-configuration-properties.md
View on GitHub## Configuration Property Changes
### MongoDB Property Restructuring
**Major reorganization:** Non-Spring Data properties moved to `spring.mongodb.*`:
**application.yml migration:**
```yaml
# Old (Spring Boot 3.x)
spring:
data:
mongodb:
uri: mongodb://localhost:27017/mydb
database: mydb
host: localhost
port: 27017
username: user
password: pass
authentication-database: admin
replica-set-name: rs0
additional-hosts:
- host1:27017
- host2:27017
ssl:
enabled: true
bundle: my-bundle
representation:
uuid: STANDARD
management:
health:
mongo:
enabled: true
metrics:
mongo:
command:
enabled: true
connectionpool:
enabled: true
# New (Spring Boot 4.0)
spring:
mongodb:
uri: mongodb://localhost:27017/mydb
database: mydb
host: localhost
port: 27017
username: user
password: pass
authentication-database: admin
replica-set-name: rs0
additional-hosts:
- host1:27017
- host2:27017
ssl:
enabled: true
bundle: my-bundle
representation:
uuid: STANDARD # Explicit configuration now required
data:
mongodb:
# Spring Data-specific properties remain here
auto-index-creation: true
field-naming-strategy: org.springframework.data.mapping.model.SnakeCaseFieldNamingStrategy
gridfs:
bucket: fs
database: gridfs-db
repositories:
type: auto
representation:
big-decimal: DECIMAL128 # Explicit configuration now required
management:
health:
mongodb: # Renamed from "mongo"
enabled: true
metrics:
mongodb: # Renamed from "mongo"
command:
enabled: true
connectionpool:
enabled: true
```
**Key changes:**
- **UUID representation**: **MANDATORY** - No default provided, must explicitly configure `spring.mongodb.representation.uuid` (e.g., `STANDARD`, `JAVA_LEGACY`, `PYTHON_LEGACY`, `C_SHARP_LEGACY`)
- **BigDecimal representation**: **MANDATORY** - No default provided, must explicitly configure `spring.data.mongodb.representation.big-decimal` (e.g., `DECIMAL128`, `STRING`)
- **Management properties**: `mongo` → `mongodb`
- **Failure to configure these will result in runtime errors when persisting UUID or BigDecimal values**
### Spring Session Property Renames
**application.yml migration:**
```yaml
# Old (Spring Boot 3.x)
spring:
session:
redis:
namespace: myapp:session
flush-mode: on-save
mongodb:
collection-name: sessions
# New (Spring Boot 4.0)
spring:
session:
data:
redis:
namespace: myapp:session
flush-mode: on-save
mongodb:
collection-name: sessions
```
### Persistence Module Property Change
**application.yml migration:**
```yaml
# Old (Spring Boot 3.x)
spring:
dao:
exceptiontranslation:
enabled: true
# New (Spring Boot 4.0)
spring:
persistence:
exceptiontranslation:
enabled: true
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |