spring-to-solon-skill

Solid

Expert guidance for migrating Java projects from Spring Boot / Spring Cloud to the Solon framework. Provides annotation mapping, dependency replacement, architecture differences, and step-by-step migration for IoC, Web, Data, Security, Scheduling, Validation, Cloud, and Testing. Use when migrating Spring Boot/Cloud projects to Solon, replacing Spring annotations/dependencies, rewriting application.yml → app.yml, Feign→Nami, @SpringBootTest→@SolonTest, Spring Security→solon-security-auth, validation→solon-security-validation, or when the user says 迁移/Spring转Solon/替换starter/去Spring依赖. Not for greenfield Solon apps (use solon-development-skill).

Code & Development 155 stars 35 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Spring to Solon Migration Skill 为将 **Spring Boot** / **Spring Cloud** 项目迁移到 **Solon 框架** 提供专家指导。Solon 是独立的 Java 企业框架(**不基于 Spring**),开发体验相近,但注解、架构与生态不同。 **官方对照**: https://solon.noear.org/article/compare-springboot **Cloud 对照**: https://solon.noear.org/article/compare-springcloud **官网**: https://solon.noear.org **当前版本**: **4.0.3** > **版本声明**:本文档所有示例基于 Solon **4.0.3**(最后一次确认: 2026-07)。如需迁移到其他版本,请调整对应版本号。Solon 高版本保持向后兼容,通常仅需修改 `solon-parent` 版本号即可。reference 内写「跟随 SKILL 目标版本」时,以本节为准。 ## Critical Migration Rules 1. **Solon 不是 Spring。** 禁止混用 Spring 注解与 Solon 注���。替换全部 Spring import。 2. **禁止 Spring 依赖。** 移除所有 `spring-boot-starter-*`、`spring-*`。Solon 使用 `org.noear` groupId。 3. **配置文件**是 `app.yml`(或 `app.properties`),**不是** `application.yml`。 4. **入口**是 `Solon.start(App.class, args)`,不是 `SpringApplication.run()`。 5. **Parent POM** 是 `solon-parent`(`groupId=org.noear`)。 6. **包扫描**在主类用 `@Import` / 主类包路径,不是 `@ComponentScan`。 7. **无 setter 注入。** Solon 只支持字段注入与构造器注入;构造器参数必须显式 `@Inject`。 8. **组件用 `@Component`**,不要用 `@Service` / `@Repository`。 9. **所有示例目标 Solon 4.0.x**(默认 **4.0.3**),除非用户指定其它版本。 10. **中文支持。** 用户使用中文时,回复与代码注释使用中文。 11. **不确定的 API 不要臆造。** 对照本 skill reference;Solon 原生细节查 `solon-development-skill`。 12. **校验坐标** 为 **`solon-security-validation`**(不是 `solon-validation`)。类级启用 `@Valid`,实体参数/字段用 `@Validated`。 13. **调度选型**:单机 → `@Scheduled`(`scheduling_migration.md`);分布式防重 → `@CloudJob`(`cloud_observability_migration.md`)。勿一律替换。 ## 与 solon-development-skill 的边界 | 场景 | 使用 s...

Details

Author
opensolon
Repository
opensolon/soloncode
Created
5 months ago
Last Updated
today
Language
Java
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category