brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
spring-mvc-to-boot-migratorAutomatically migrate Spring MVC applications to Spring Boot. Use when you need to modernize a Spring MVC project to Spring Boot while preserving functionality. The skill analyzes the codebase, updates build configuration (Maven/Gradle), migrates annotations, converts XML configuration to Java/properties, updates controllers and tests, and creates the Sprin…
Independent GitHub snapshot · Automated classification · Original documentation governs
This skill automatically migrates Spring MVC applications to Spring Boot, transforming build configuration, annotations, XML configuration, controllers, and tests while preserving existing functionality. It handles Maven and Gradle projects, creates incremental git commits, and generates detailed migration summaries.
# Navigate to your Spring MVC project
cd /path/to/spring-mvc-project
# Run migration (auto-detects Maven or Gradle)
python scripts/migrate.py .
# Or specify build tool explicitly
python scripts/migrate.py . --build-tool maven
The migration process will:
# Migrate Spring MVC project
python scripts/migrate.py /path/to/project
# Output:
# ✓ Detected build tool: maven
# ✓ Detected Spring version: 5.3.20
# ✓ Created migration branch: migrate-spring-mvc-to-boot
# ✓ Analyzing codebase...
# ✓ Found 8 controllers
# ✓ Found 12 services
# ✓ Found 15 test files
# ✓ Migrating build configuration...
# ✓ Migrating annotations...
# ✓ Migrating configuration...
# ✓ Migrating tests...
# ✓ Migration completed successfully!
What gets migrated:
Build Configuration
Annotations
@Controller + @ResponseBody → @RestController@RequestMapping(method = RequestMethod.GET) → @GetMapping@PostMapping, @PutMapping, @DeleteMappingjavax.* to jakarta.*Configuration
Tests
@RunWith(SpringRunner.class) → @SpringBootTest@AutoConfigureMockMvcExample transformation:
Before (Spring MVC):
@Controller
@RequestMapping("/users")
public class UserController {
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public List<User> getUsers() {
return userService.findAll();
}
}
After (Spring Boot):
@RestController
@RequestMapping("/users")
public class UserController {
@GetMapping
public List<User> getUsers() {
return userService.findAll();
}
}
The migration tool automatically:
Maven projects:
Gradle projects:
Updates Java annotations:
@RestController)@GetMapping, @PostMapping, etc.)javax.* → jakarta.*)@SpringBootApplicationConverts configuration:
application.properties with common settingsUpdates test files:
Creates comprehensive report:
MIGRATION_SUMMARY.jsonpython scripts/migrate.py <repo_path> [--build-tool <maven|gradle|auto>]
# Options:
# repo_path: Path to the Spring MVC repository
# --build-tool: Build tool (default: auto-detect)
You can also run individual migration steps:
from migrate_build import BuildMigrator
from migrate_annotations import AnnotationMigrator
from migrate_config import ConfigMigrator
from migrate_tests import TestMigrator
# Run specific migration
migrator = AnnotationMigrator(repo_path)
migrator.migrate()
After migration completes:
Review the changes
git log --oneline
git diff main..migrate-spring-mvc-to-boot
Build the project
# Maven
mvn clean package
# Gradle
gradle clean build
Run the application
# Maven
mvn spring-boot:run
# Gradle
gradle bootRun
# Or run JAR directly
java -jar target/myapp.jar
Run tests
# Maven
mvn test
# Gradle
gradle test
Manual review needed for:
Test endpoints
curl http://localhost:8080/users
Merge when ready
git checkout main
git merge migrate-spring-mvc-to-boot
references/migration_guide.md - Comprehensive step-by-step migration guide covering all aspects from build configuration to testing, with detailed examples and troubleshootingreferences/framework_comparison.md - Detailed comparison of Spring MVC and Spring Boot including architecture, configuration, controllers, testing, and deploymentExample controller files are provided in assets/:
UserController_Before.java - Spring MVC controller before migrationUserController_After.java - Spring Boot controller after migrationCompare these files to understand the transformations applied.
After migration, review MIGRATION_SUMMARY.json:
{
"source_framework": "Spring MVC",
"target_framework": "Spring Boot",
"build_tool": "maven",
"total_changes": 35,
"changes_by_type": {
"build": 5,
"annotation": 12,
"config": 6,
"test": 12
},
"files_modified": [...],
"next_steps": [...]
}
Issue: Application won't start
@SpringBootApplication annotation and correct package structureIssue: Controllers not found
Issue: Build fails
mvn clean install or gradle clean build to refresh dependenciesIssue: Tests fail
Issue: Database connection fails
See references/migration_guide.md for detailed troubleshooting.