spring-to-solon-skill

v1.0.0

Expert guidance for migrating Java projects from Spring Boot / Spring Cloud to the Solon framework. Provides comprehensive annotation mapping, dependency rep...

0· 75·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for noear/spring-to-solon-skill.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "spring-to-solon-skill" (noear/spring-to-solon-skill) from ClawHub.
Skill page: https://clawhub.ai/noear/spring-to-solon-skill
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install spring-to-solon-skill

ClawHub CLI

Package manager switcher

npx clawhub@latest install spring-to-solon-skill
Security Scan
Capability signals
CryptoCan make purchases
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the included reference files and SKILL.md: all files are migration references (annotations, dependencies, IoC, web, data, cloud, testing). There are no unrelated environment variables, binaries, or install steps requested that would be disproportionate to a migration guide.
Instruction Scope
SKILL.md and reference files contain explicit, scenario-based migration guidance and example code. Instructions confine themselves to reading the provided reference files and giving migration advice; they do not instruct reading system files, environment variables, or exfiltrating data. Note: SKILL.md enforces Chinese-language responses when the user speaks Chinese (a behavioral constraint but not a security issue).
Install Mechanism
No install specification or code to download/execute is present — instruction-only skill. This minimizes on-disk execution risk.
Credentials
The skill does not request or require any environment variables, credentials, or config paths. All examples reference typical application resources (e.g., /uploads) for demonstration only; no secret access is requested.
Persistence & Privilege
The skill does not request always:true or other elevated persistence. It is user-invocable and may be called autonomously per platform default, which is expected for skills of this type.
Assessment
This skill is an offline, documentation-style migration helper and appears internally consistent. Before using it in an automated refactor: (1) back up your repository and run tests — the guidance advises sweeping annotation/dependency replacements which, if applied blindly, can break projects; (2) review any code changes it recommends (especially around transactions, datasource configs, and file paths like /uploads); (3) note that it will respond in Chinese (including code comments) if you communicate in Chinese; and (4) if you plan to grant the agent access to your source repo or CI/CD, treat that as an additional operational risk (not caused by this skill) and restrict credentials/permissions accordingly.

Like a lobster shell, security has layers — review code before you run it.

latestvk9702sdk6fs6r7ns35ewrh0r7d84xr3n
75downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

Spring to Solon Migration Skill

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

Critical Migration Rules

  1. Solon is NOT Spring. Never mix Spring annotations with Solon annotations. Replace ALL Spring imports.
  2. No Spring dependencies. Remove all spring-boot-starter-*, spring-* artifacts. Solon uses org.noear group ID.
  3. Configuration file is app.yml (or app.properties), NOT application.yml.
  4. Entry point is Solon.start(App.class, args), NOT SpringApplication.run().
  5. Parent POM is solon-parent with groupId=org.noear.
  6. Package scan uses @Import on main class, NOT @ComponentScan.
  7. No setter injection. Solon only supports field injection and constructor injection.
  8. All examples target Solon 3.10.x unless specified otherwise.
  9. 中文支持. When the user communicates in Chinese, all responses and code comments must be in Chinese.

Migration Scene Navigation

根据迁移场景,读取对应的 reference 文件获取详细信息。

快速对照

ScenarioReference FileGrep Keywords
注解替换对照表 / 完整的 Spring→Solon 注解映射references/annotation_mapping.md@Autowired, @Inject, @RequestMapping, @Mapping, @Service, @Component, @Value
Maven 依赖替换 / starter → solon 插件 / POM 改造references/dependency_mapping.mdpom.xml, spring-boot-starter, solon-web, solon-lib, solon-parent

IoC / AOP / 配置

ScenarioReference FileGrep Keywords
IoC 容器 / DI / 组件注册 / 作用域 / 生命周期 / AOP / 事件 / 包扫描references/ioc_aop_migration.md@Inject, @Configuration, @Bean, LifecycleBean, @Init, @Destroy, @Aspect, EventBus
配置文件 / 属性注入 / 配置类 / Bean 定义 / 条件装配references/config_system_migration.mdapp.yml, @Inject("${"), @Configuration, @Bean, @Condition, solon.config

Web 层迁移

ScenarioReference FileGrep Keywords
Controller / 请求参数 / 返回值 / Context 上下文references/web_controller_migration.md@Controller, @RestController, @Mapping, @Param, @Body, Context
Filter / Interceptor / 全局异常 / CORSreferences/web_filter_interceptor_migration.mdFilter, RouterInterceptor, @ControllerAdvice, GlobalExceptionFilter, @CrossOrigin
文件上传下载 / SSE / WebSocket / 参数校验 / 会话references/web_advanced_migration.mdUploadedFile, SseEmitter, WebSocket, @Valid, SessionState

数据访问迁移

ScenarioReference FileGrep 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

微服务迁移

ScenarioReference FileGrep Keywords
注册发现 / 配置中心 / 陷阱清单references/cloud_discovery_config_migration.mdNacos, Eureka, CloudClient, @CloudConfig, discovery, config
RPC (Feign→Nami) / 网关 / 事件消息references/cloud_gateway_rpc_migration.mdFeign, NamiClient, CloudGateway, @CloudEvent, Gateway
断路器 / 任务调度 / 链路追踪 / 分布式锁/ID/文件/名单/监控/日志references/cloud_observability_migration.mdBreaker, @CloudJob, Trace, CloudLock, CloudId, CloudFile, Metric

测试迁移

ScenarioReference FileGrep Keywords
依赖 / 测试类 / HTTP 测试 / 配置 / Mock / 事务回滚references/test_basics_migration.md@SpringBootTest, @SolonTest, HttpTester, Mock, @TestRollback
切面 / 条件 / 生命周期 / WebFlux / 数据层 / 完整示例 / 陷阱references/test_advanced_migration.md@Rollback, WebFlux, @SolonTest, @EnableAutoConfiguration, assert

Quick Migration Checklist

Step 1: POM 改造

  • Replace spring-boot-starter-parentsolon-parent
  • Replace Spring starters → Solon plugins
  • Add solon-maven-plugin
  • See: references/dependency_mapping.md

Step 2: 配置文件

  • Rename application.ymlapp.yml
  • Adjust configuration key names
  • See: references/config_system_migration.md

Step 3: 启动类

  • Replace @SpringBootApplication@SolonMain
  • Replace SpringApplication.run()Solon.start()
  • See: references/annotation_mapping.md

Step 4: 注解替换

  • Replace all Spring annotations with Solon equivalents
  • See: references/annotation_mapping.md

Step 5: Web 层改造

  • Replace @RestController@Controller
  • Replace @RequestMapping@Mapping
  • Handle HttpServletRequest/ResponseContext
  • See: references/web_controller_migration.md

Step 6: 数据层改造

  • Replace Spring transaction/cache annotations
  • See: references/datasource_orm_migration.md, references/transaction_cache_migration.md

Step 7: 微服务改造 (如适用)

  • Replace Spring Cloud components with Solon Cloud equivalents
  • See: references/cloud_discovery_config_migration.md

Step 8: 测试改造

  • Replace @SpringBootTest@SolonTest
  • See: references/test_basics_migration.md

Comments

Loading comments...