Provide expert guidance for migrating Java projects from Spring Boot / Spring Cloud to the Solon framework. Solon is an independent Java enterprise framework (NOT based on Spring) that offers similar developer experience but with different annotations, architecture, and ecosystem.
Official comparison: https://solon.noear.org/article/compare-springboot
Official cloud comparison: https://solon.noear.org/article/compare-springcloud
Solon website: https://solon.noear.org
Current version: 3.10.x
spring-boot-starter-, spring- artifacts. Solon uses org.noear group ID.app.yml (or app.properties), NOT application.yml.Solon.start(App.class, args), NOT SpringApplication.run().solon-parent with groupId=org.noear.@Import on main class, NOT @ComponentScan.> 根据迁移场景,读取对应的 reference 文件获取详细信息。
| Scenario | Reference File | Grep Keywords |
|---|---|---|
| --- | --- | --- |
| 注解替换对照表 / 完整的 Spring→Solon 注解映射 | references/annotation_mapping.md | @Autowired, @Inject, @RequestMapping, @Mapping, @Service, @Component, @Value |
| Maven 依赖替换 / starter → solon 插件 / POM 改造 | references/dependency_mapping.md | pom.xml, spring-boot-starter, solon-web, solon-lib, solon-parent |
| Scenario | Reference File | Grep Keywords |
|---|---|---|
| --- | --- | --- |
| IoC 容器 / DI / 组件注册 / 作用域 / 生命周期 / AOP / 事件 / 包扫描 | references/ioc_aop_migration.md | @Inject, @Configuration, @Bean, LifecycleBean, @Init, @Destroy, @Aspect, EventBus |
| 配置文件 / 属性注入 / 配置类 / Bean 定义 / 条件装配 | references/config_system_migration.md | app.yml, @Inject("${"), @Configuration, @Bean, @Condition, solon.config |
| Scenario | Reference File | Grep Keywords |
|---|---|---|
| --- | --- | --- |
| Controller / 请求参数 / 返回值 / Context 上下文 | references/web_controller_migration.md | @Controller, @RestController, @Mapping, @Param, @Body, Context |
| Filter / Interceptor / 全局异常 / CORS | references/web_filter_interceptor_migration.md | Filter, RouterInterceptor, @ControllerAdvice, GlobalExceptionFilter, @CrossOrigin |
| 文件上传下载 / SSE / WebSocket / 参数校验 / 会话 | references/web_advanced_migration.md | UploadedFile, SseEmitter, WebSocket, @Valid, SessionState |
| Scenario | Reference File | Grep Keywords |
|---|---|---|
| --- | --- | --- |
| 数据源 / MyBatis / MyBatis Plus / JPA / 多数据源 | references/datasource_orm_migration.md | @Db, SqlUtils, MyBatis, JPA, HikariDataSource, @Mapper |
| 事务 / 缓存 / Redis / 陷阱清单 | references/transaction_cache_migration.md | @Transaction, @Cache, Redis, @CacheRemove, CacheService |
| Scenario | Reference File | Grep Keywords |
|---|---|---|
| --- | --- | --- |
| 注册发现 / 配置中心 / 陷阱清单 | references/cloud_discovery_config_migration.md | Nacos, Eureka, CloudClient, @CloudConfig, discovery, config |
| RPC (Feign→Nami) / 网关 / 事件消息 | references/cloud_gateway_rpc_migration.md | Feign, NamiClient, CloudGateway, @CloudEvent, Gateway |
| 断路器 / 任务调度 / 链路追踪 / 分布式锁/ID/文件/名单/监控/日志 | references/cloud_observability_migration.md | Breaker, @CloudJob, Trace, CloudLock, CloudId, CloudFile, Metric |
| Scenario | Reference File | Grep Keywords |
|---|---|---|
| --- | --- | --- |
| 依赖 / 测试类 / HTTP 测试 / 配置 / Mock / 事务回滚 | references/test_basics_migration.md | @SpringBootTest, @SolonTest, HttpTester, Mock, @TestRollback |
| 切面 / 条件 / 生命周期 / WebFlux / 数据层 / 完整示例 / 陷阱 | references/test_advanced_migration.md | @Rollback, WebFlux, @SolonTest, @EnableAutoConfiguration, assert |
spring-boot-starter-parent → solon-parentsolon-maven-pluginreferences/dependency_mapping.mdapplication.yml → app.ymlreferences/config_system_migration.md@SpringBootApplication → @SolonMainSpringApplication.run() → Solon.start()references/annotation_mapping.mdreferences/annotation_mapping.md@RestController → @Controller@RequestMapping → @MappingHttpServletRequest/Response → Contextreferences/web_controller_migration.mdreferences/datasource_orm_migration.md, references/transaction_cache_migration.mdreferences/cloud_discovery_config_migration.md@SpringBootTest → @SolonTestreferences/test_basics_migration.md共 1 个版本