spring-boot-development

Implements Spring Boot REST APIs, services, repositories, and integrations following layered architecture rules.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/shengmingzhishu/LeeCommonSkills --skill spring-boot-development-shengmingzhishu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: spring-boot-development
Source: https://github.com/shengmingzhishu/LeeCommonSkills/tree/main/.rules-skills/java-stack/.trae/skills/spring-boot-development
Command: npx skills add https://github.com/shengmingzhishu/LeeCommonSkills --skill spring-boot-development-shengmingzhishu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building Spring Boot features without consistent structure leads to tangled controllers, missing validation, and inconsistent error handling. This Skill guides AI-assisted development of Java backend features so every change follows Controller → Service → Repository boundaries with proper DTOs, validation, and exception mapping. ## Core Features & Use Cases - Layered Feature Implementation: Enforces Controller → Service → Repository/Adapter boundaries with constructor injection, DTOs, and parameter validation. - Change-Level Routing: Uses change-router to classify work as L0 (minimal fix), L1 (lightweight design card), or L2/L3 (API/data contract first) before coding. - Quality Gates: Produces layered implementation plans, API/DTO change lists, test scope, and risk notes, then hands off to testing and review skills. - Use Case: When asked to add a new order-management REST endpoint, the Skill first classifies the change level, drafts the API contract, implements the controller, service, and repository layers with unified exception handling, then triggers the spring-boot-testing workflow. ## Quick Start Ask the AI to implement a new Spring Boot REST endpoint for creating orders, including the service layer, repository, validation, and error handling.

Frequently Asked Questions about spring-boot-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Spring Boot REST API with proper layering?▼

Structure Spring Boot APIs with Controller → Service → Repository/Adapter boundaries. Controllers handle HTTP and validation, services contain business logic, and repositories manage persistence. Use constructor injection and DTOs to keep layers decoupled.

How to implement unified exception handling in Spring Boot?▼

Implement unified exception handling using @ControllerAdvice with @ExceptionHandler methods that map exceptions to consistent error responses. This keeps error formatting out of controllers and ensures clients receive predictable API error payloads.

Should I use constructor injection or field injection in Spring Boot?▼

Constructor injection is preferred in Spring Boot because it makes dependencies explicit, supports final fields, and simplifies unit testing. Field injection with @Autowired hides dependencies and complicates test setup.

When should I define API contracts before coding a Spring Boot feature?▼

Define API and data contracts first for L2/L3 changes involving new endpoints, schema changes, or cross-team integrations. Small L0 fixes and L1 internal changes can proceed with minimal or lightweight design documentation.

What validation approach works for Spring Boot request DTOs?▼

Use Bean Validation annotations like @NotNull and @Size on request DTOs combined with @Valid in controller methods. Validation failures are then mapped through the unified exception handler into consistent error responses.