/java-skills:spring-boot-starter-patternsfrom java-skills
Spring Boot Starter 开发规范:标准 POM 结构、十分支版本矩阵(2.3.x~4.1.x)、tag 发布工作流、JDK 兼容规则与 JaCoCo 90% 覆盖率门禁。纠正 LLM 常见错误如 properties 分类、licenses/scm/developers 元数据、java.version 写法等。
Ships in java-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
权威模板:
openclaw-spring-boot-starter/pom.xml(2.7.x,commit b091ee4)
组织扩展:文末 §6;完整模板:assets/pom-template.xml
java-component-patterns| # | 错误 | 正确做法 |
|---|---|---|
| 1 | properties 平铺不分类不排序 | 三段式:基础→Third-Party→Maven Plugin,段内自然排序 |
| 2 | 删除 licenses/scm/developers | 保留并标准化(Central 发布必需),每段配中文注释 |
| 3 | java.version 写 1.8 | 写 8(compiler 3.15.0 对 --release 1.8 报错) |
| 4 | surefire argLine 丢 ${argLine} | 必须 ${argLine} -Xmx1024m -Dfile.encoding=UTF-8(JaCoCo 注入点) |
| 5 | 把 okhttp/commons-io 当默认依赖 | 只有被集成组件是业务依赖;SB 四件套+被集成组件+lombok(按需)+test |
| 6 | 项目无 lombok 却保留 annotationProcessorPaths | 无 lombok → 连同 compiler 注解路径块一起删 |
| 7 | jacoco check 不设 haltOnFailure | <haltOnFailure>true + BUNDLE LINE ≥ 0.90 |
| 8 | 用 JDK 26 编译 target 8 | export JAVA_HOME=$(/usr/libexec/java_home -v 21) |
| 9 | 以为 Maven 4 下必须改 model | M4 兼容 model 4.0.0(零改动);新特性(session scope 等)才需升级 4.1.0(仅 M4 可构建,详见 references/maven4.md) |
parent → 坐标 → name/description/url
→ licenses → scm → developers (Central 必需元数据)
→ properties(三段式) → dependencyManagement → dependencies
→ distributionManagement → build(pluginManagement+plugins)→ profiles
① 基础(自然排序): java.version / maven.compiler.source+target / 两 encoding
② <!-- Third-Party Dependencies --> : 被集成组件版本
③ <!-- Maven Plugin Dependencies --> : 完整 22 插件版本
| 分支 | SB parent | JDK |
|---|---|---|
| 2.3.x | 2.3.12.RELEASE | 8 |
| 2.7.x | 2.7.18 | 8 |
| 3.0.x~3.5.x | 3.0.13/3.1.12/3.2.12/3.3.13/3.4.13/3.5.16 | 17 |
| 4.0.x / 4.1.x | 4.0.7 / 4.1.0 | 21 |
版本格式:{line}.x.{yyyyMMdd}-SNAPSHOT ↔ tag {line}.x.{yyyyMMdd};月度滚动 20260630→20260730。
XxxAutoConfiguration + XxxProperties(@ConfigurationProperties) + XxxTemplateXxxAutoConfigurationTest(ApplicationContextRunner) + XxxPropertiesTest + 模板测试复制 assets/pom-template.xml → 替换占位符 → 按分支矩阵填 parent/java.version → 核对 properties 三段式 → 源码三件套 → 测试三件套 → mvn clean verify 通过 → 十分支创建。完整演练与逐项勾选清单见 examples/create-new-starter.md。
| 文件 | 何时读 |
|---|---|
| references/pom-structure.md | 写/改 pom 时:元素顺序详解、三段式全量示例、build 11 插件配置表、profiles 完整结构 |
| references/version-matrix.md | 分支/发版时:十分支全表、tag 发布 4 步、SNAPSHOT 滚动映射、SB parent 核对、JDK 兼容规则表 |
| references/maven4.md | 用 Maven 4 构建时:M3/M4 差异、运行 JDK 17+、maven.version 基线与 enforcer 区间、consumer POM、wrapper 迁移、CI 双轨 |
| examples/create-new-starter.md | 从零新建 starter 的 8 步完整演练(含验收标准) |
| examples/maven4-migration.md | 迁 Maven 4 时:双轨 enforcer、wrapper 切换、M4+JDK21 验证 release 8、consumer POM 检查、CI 双轨、按需升 model 4.1.0 |
| assets/pom-template.xml | Maven 3 / model 4.0.0 模板(M3/M4 双轨,XML 校验通过) |
| assets/pom-template-maven4.xml | Maven 4 / model 4.1.0 模板(enforcer [4.0.0,)、session scope 示例;仅 M4 可构建) |
要发布的东西是什么?
├── xxx-spring-boot-starter(整合某组件到 Spring Boot)→ 本 skill
└── 独立 Java 库/SDK(无 Spring 依赖,无 parent)→ java-component-patterns
依赖顺序: 组件先发正式版 → starter 再发
io.github.easy4j;仓库 packages.aliyun.com(release 2624322-release-6F6h6R / snapshot 2624322-snapshot-3EoOv3)<a href="https://github.com/loong10k">Loong Wan</a>;英语 Javadocagents/openai.yaml (opens in a new tab)assets/pom-template-maven4.xml (opens in a new tab)assets/pom-template.xml (opens in a new tab)examples/create-new-starter.md (opens in a new tab)examples/maven4-migration.md (opens in a new tab)references/maven4.md (opens in a new tab)references/pom-structure.md (opens in a new tab)references/version-matrix.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (full-stack-skills/java-skills) — no native marketplace selected
npx claudepluginhub p/full-statck-skills-java-skills39 skills in this plugin
/caffeine-patternsCaffeine JVM 本地缓存技能。覆盖本地缓存 vs 远程缓存(Redis)选择决策树、expireAfterWrite vs expireAfterAccess vs refreshAfterWrite 三种过期策略对比与组合规则(refresh < expire)、CacheLoader加载与reload异步刷新模式、Spring Cache @Cacheable集成、maximumSize驱逐策略、recordStats缓存统计。 纠正 LLM:用 ConcurrentHashMap+手动过期、所有缓存走Redis、refreshAfterWrite > expireAfterWrite导致永远不刷新、CacheLoader返回null导致缓存穿透。/commons-patternsApache Commons 最佳实践模式。从官方文档提炼,覆盖 Commons Lang3(StringUtils千面判空/isEmpty vs isBlank/Validate抛NullPointerException迁移)、Commons IO(IOUtils.toString大文件陷阱/FileUtils.lineIterator逐行读模式/FilenameUtils.normalize路径规范化)、Commons Collections4(CollectionUtils.union/intersection/subtract集合运算)。 纠正 LLM 误用:混淆 StringUtils.isBlank vs isEmpty、IOUtils.toString 读大文件OOM、不知道 LineIterator 逐行读模式、用 lang 而非 lang3 包名。/