spring-boot-skill

用于按照最佳实践构建 Spring Boot 4.x 应用的技能说明。适用于使用 Spring MVC、Spring Data JPA、Spring Modulith 与 Spring Security 开发时,涵盖推荐的包结构、实现 REST API、实体/仓库与服务层、模块化单体架构、使用 Thymeleaf 构建 Web 视图、为 REST 与 Web 应用编写测试、编写 ArchUnit 架构测试、配置推荐的 Maven 插件与设置、利用 Spring Boot 的 Docker Compose 支持进行本地开发,以及创建 Taskfile 以简化常见任务。

仓库最近推送
GitHub Stars
198
Forks
48
Issues / PRs
2

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "spring-boot-skill":https://skillpi.com/zh/skills/deepskill-c42eea3a823c431946c8b0d2a23ae7c547db5c421154bf384bbe97dc1d6c2c12。安装前核对上游来源和版本:https://github.com/sivaprasadreddy/sivalabs-agent-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

用于按照最佳实践构建 Spring Boot 4.x 应用的技能说明。适用于使用 Spring MVC、Spring Data JPA、Spring Modulith 与 Spring Security 开发时,涵盖推荐的包结构、实现 REST API、实体/仓库与服务层、模块化单体架构、使用 Thymeleaf 构建 Web 视图、为 REST 与 Web 应用编写测试、编写 ArchUnit 架构测试、配置推荐的 Maven 插件与设置、利用 Spring Boot 的 Docker Compose 支持进行本地开发,以及创建 Taskfile 以简化常见任务。

0 下载

介绍来源: third_party · sivaprasadreddy · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
软件、账号及付费要求
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: spring-boot-skill
description: >
  Build Spring Boot 4.x applications following the best practices. 
  Use this skill:
    * When developing Spring Boot applications using Spring MVC, Spring Data JPA, Spring Modulith, Spring Security
    * To create recommended Spring Boot package structure
    * To implement REST APIs, entities/repositories, service layer, modular monoliths
    * To use Thymeleaf view templates for building web applications
    * To write tests for REST APIs and Web applications
    * To write ArchUnit tests for testing architecture
    * To configure the recommended plugins and configurations to improve code quality, and testing while using Maven.
    * To use Spring Boot's Docker Compose support for local development
    * To create Taskfile for easier execution of common tasks while working with a Spring Boot application

Spring Boot Skill

Apply the practices below when developing Spring Boot applications. Read the linked reference only when working on that area.

Maven pom.xml Configuration

Read references/spring-boot-maven-config.md for Maven pom.xml configuration with supporting plugins and configurations to improve code quality, and testing.

Package structure

Read references/code-organization.md for domain-driven, module-based package layout and naming conventions.

Spring Data JPA

Implement the repository and entity layer using references/spring-data-jpa.md.

Service layer

Implement business logic in the service layer using references/spring-service-layer.md.

Spring MVC REST APIs

Implement REST APIs with Spring MVC using references/spring-webmvc-rest-api.md.

Spring Modulith

Build a modular monolith with Spring Modulith using references/spring-modulith.md.

Thymeleaf

If Thymeleaf is used for view templates, refer references/thymeleaf.md

Testing

Write tests at complementary levels — unit, sliced Spring tests, and at least one end-to-end/smoke test; the levels are not either/or. Most framework-touching tests belong at the fast sliced level (@SpringBootTest(classes = …) or a slice annotation); keep full-context @SpringBootTest for a smoke test plus a request-level end-to-end. For why the levels are complementary and how to keep a large suite fast (context caching, one container for the suite), read references/testing-strategy.md.

What you're testing Level Reference
Business/domain logic, no framework Unit (no Spring context) testing-unit-mocking.md
JPA / JDBC / JdbcClient / Spring Data JDBC / jOOQ queries Persistence slice + Testcontainers testing-slices-persistence.md
Controller, JSON serialization, or a REST client Web slice (@WebMvcTest/@JsonTest/@RestClientTest) testing-slices-web.md
A few components together, external HTTP (WireMock), or a startup/request-level smoke test Sliced @SpringBootTest(classes = …) or smoke test testing-integration.md
Full REST API over a real port, full BaseIT suite (RestTestClient) End-to-end spring-boot-rest-api-testing.md
A view-rendering controller (MockMvcTester) Web slice spring-boot-webapp-testing-with-mockmvctester.md
Wiring a container (@ServiceConnection / dynamic properties) — testcontainers-wiring.md

All persistence and integration tests use Testcontainers with a real database (never in-memory H2); see references/testcontainers-wiring.md for @ServiceConnection vs dynamic-property wiring.

Test Data Setup

Prefer SQL fixtures with @Sql("classpath:/test-data.sql") before every test method. When setting up data programmatically, prefer exposed Services or ModuleAPI classes over Repositories, JdbcTemplate, or JdbcClient. Unless absolutely necessary, avoid using JdbcTemplate, JdbcClient, or TransactionTemplate to execute SQL for test data setup, which couples tests to internal implementation details. Read references/test-data-setup.md when creating or changing test fixtures.

Write ArchUnit Tests

To write tests for testing the architecture using ArchUnit, refer references/archunit.md

Spring Boot Docker Compose Support

To use Docker Compose support for local development, refer references/spring-boot-docker-compose.md.

Taskfile

Use references/taskfile.md for easier commands execution.

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • Spring Boot 全栈开发最佳实践指南,涵盖架构设计、测试策略、工具链集成等核心工程能力
触发精准95/100

亮点

  • 触发场景描述详尽且边界清晰,覆盖 Spring MVC/JPA/Modulith/Security/测试等九大高频开发需求
结构规范95/100

亮点

  • 模块化文档结构清晰,每节配有权威参考链接;Testing 部分提供可操作的层级化测试矩阵
执行可靠95/100

亮点

  • 严格遵循 Spring Boot 官方推荐实践(如 Testcontainers 替代 H2、分层测试策略),规避常见陷阱
证据可验 (前四项均值)95/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

翻译待完成,请参阅来源文档。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。