Skip to content
cccskills
FreePublished on GitHub

springboot-verification

Spring Boot 项目的验证循环:构建、静态分析、带有覆盖率的测试、安全扫描以及发布或 PR 前的差异审查。

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Spring Boot 验证循环

在提交 PR、发生重大变更后或部署前执行。

阶段 1:构建

mvn -T 4 clean verify -DskipTests
# 或者
./gradlew clean assemble -x test

如果构建失败,请停止并修复问题。

阶段 2:静态分析

Maven(常用插件):

mvn -T 4 spotbugs:check pmd:check checkstyle:check

Gradle(如果已配置):

./gradlew checkstyleMain pmdMain spotbugsMain

阶段 3:测试 + 覆盖率

mvn -T 4 test
mvn jacoco:report   # 确认覆盖率是否达到 80% 以上
# 或者
./gradlew test jacocoTestReport

报告内容:

  • 测试总数、通过/失败数
  • 覆盖率 %(行/分支)

阶段 4:安全扫描

# 依赖项 CVE 漏洞扫描
mvn org.owasp:dependency-check-maven:check
# 或者
./gradlew dependencyCheckAnalyze

# 敏感信息/密钥扫描(git)
git secrets --scan  # 如果已配置

阶段 5:Lint/格式化(可选门禁)

mvn spotless:apply   # 如果使用了 Spotless 插件
./gradlew spotlessApply

阶段 6:差异审查 (Diff Review)

git diff --stat
git diff

检查清单:

  • 无残留的调试日志(如 System.out、无级别保护的 log.debug)
  • 具有明确语义的错误信息和 HTTP 状态码
  • 在必要位置包含了事务(Transaction)和校验(Validation)
  • 配置变更已记录在文档中

输出模板

验证报告
===================
构建:       [通过/未通过]
静态分析:   [通过/未通过] (spotbugs/pmd/checkstyle)
测试:       [通过/未通过] (X/Y 通过, Z% 覆盖率)
安全:       [通过/未通过] (发现 CVE: N)
差异:       [X 个文件变更]

整体状态:   [就绪 / 未完成]

需要修复的问题:
1. ...
2. ...

持续模式

  • 发生重大变更或在长会话中,每 30~60 分钟重新运行一次各阶段。
  • 保持短循环:通过 mvn -T 4 test + spotbugs 获取快速反馈。

注意:及时的反馈优于迟来的意外。请保持门禁(Gates)严格,并在生产系统中将警告视为缺陷。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

生产级 API 的 REST API 设计模式,包括资源命名、状态码、分页、过滤、错误响应、版本控制和速率限制。

The English summary is being prepared. Showing the original description.

xu-xiang/everything-claude-code-zh2KUpdated Mar 5, 2026

REST API设计模式,包括资源命名、状态码、分页、过滤、错误响应、版本控制和生产API的速率限制。

The English summary is being prepared. Showing the original description.

xu-xiang/everything-claude-code-zh2KUpdated Mar 5, 2026

撰写文章、指南、博客、教程、时事通讯等长篇内容,并根据提供的示例或品牌指南呈现独特的语言风格。当用户需要篇幅超过一段的精炼文字,且重视风格一致性、结构和可信度时,请使用此技能。

The English summary is being prepared. Showing the original description.

xu-xiang/everything-claude-code-zh2KUpdated Mar 5, 2026

编写文章、指南、博客、教程、时事通讯(Newsletter)等长内容,支持从示例或品牌指南中提取独特的语感语调。适用于需要撰写超过一个段落的精炼文本,尤其是对语气一致性、结构和可信度有较高要求时。

The English summary is being prepared. Showing the original description.

xu-xiang/everything-claude-code-zh2KUpdated Mar 5, 2026

根据提供的示例或品牌指导,以独特的语气撰写文章、指南、博客帖子、教程、新闻简报等长篇内容。当用户需要超过一段的精致书面内容时使用,尤其是当语气一致性、结构和可信度至关重要时。

The English summary is being prepared. Showing the original description.

xu-xiang/everything-claude-code-zh2KUpdated Mar 5, 2026

编写文章、指南、博客帖子、教程、新闻通讯(newsletter)以及其他长篇内容。这些内容具有从提供的示例或品牌指南中提取出的独特语气。当用户需要比段落更长的精美文案,且对语气一致性、结构和可信度有要求时,请使用此技能(Skill)。

The English summary is being prepared. Showing the original description.

xu-xiang/everything-claude-code-zh2KUpdated Mar 5, 2026

See all skills by xu-xiang

Report a problem with this skill