spring-boot-ultimate

📁 halilugur/spring-boot-ultimate 📅 Feb 7, 2026
2
总安装量
2
周安装量
#75340
全站排名
安装命令
npx skills add https://github.com/halilugur/spring-boot-ultimate --skill spring-boot-ultimate

Agent 安装分布

amp 2
gemini-cli 2
claude-code 2
github-copilot 2
codex 2
kimi-cli 2

Skill 文档

Spring Boot Ultimate

A comprehensive skill for Spring Boot development providing code snippets, patterns, and best practices for building modern Spring Boot applications.

Tech Stack

  • Java: 21+ with records and pattern matching
  • Spring Boot: 4.x
  • Security: JWT-based stateless authentication with Spring Security 6
  • Database: JPA/Hibernate with UUID primary keys
  • Build: Maven

Core Patterns Reference

This skill includes reference implementations in the assets/ directory demonstrating:

1. Base Entity Pattern (assets/entities/BaseEntity.java)

All entities should extend BaseEntity which provides:

  • TIME-based UUID primary key (@UuidGenerator(style = TIME))
  • Automatic timestamps (createdAt, updatedAt)
  • Soft delete flag (isEnable)
@Setter
@Getter
@MappedSuperclass
@NoArgsConstructor
@AllArgsConstructor
public abstract class BaseEntity implements Serializable {
    @Id
    @UuidGenerator(style = UuidGenerator.Style.TIME)
    private String id;

    @CreationTimestamp
    private LocalDateTime createdAt;

    @UpdateTimestamp
    private LocalDateTime updatedAt;

    private boolean isEnable = true;
}

2. Response Wrapper Pattern (assets/responses/response/Response.java, assets/responses/response/PageResponse.java)

  • Response<T>: Standard API response wrapper with success, data, error
  • PageResponse<T>: Extends Response with pagination metadata
  • Uses @SuperBuilder for inheritance with builder pattern

3. Controller Pattern (assets/controllers/UserController.java)

  • @RequiredArgsConstructor for constructor injection
  • ResponseEntity for proper HTTP responses
  • @PreAuthorize for method-level security
  • @PageableDefault for pagination defaults

4. Service Pattern (assets/services/AuthService.java)

  • @Transactional(readOnly = true) at class level
  • @Transactional for write methods
  • Clean separation between authentication and business logic

5. Mapper Pattern (assets/mappers/UserMapper.java)

  • Static utility class with private constructor
  • Separate methods for different request types
  • Entity <-> DTO conversion methods

6. Security Pattern (assets/security/)

  • JwtTokenProvider: JWT generation and validation
  • JwtAuthenticationFilter: Stateless JWT filter
  • SecurityConfig: Spring Security 6 configuration with method security

7. Configuration Pattern (assets/config/)

  • Type-safe @ConfigurationProperties classes
  • Separate configs for CORS, JWT, etc.

When to Use This Skill

Invoke this skill when working on:

  • Creating new REST endpoints
  • Implementing JWT authentication
  • Setting up JPA entities and repositories
  • Configuring Spring Security
  • Implementing pagination
  • Writing service layer logic
  • Creating DTOs and mappers

Code Generation

When asked to generate code, provide:

  1. Code snippets for the specific pattern/component
  2. Brief explanation of the pattern
  3. Assets to full implementations in assets/ directory

Code Review

When reviewing Spring Boot code, check for:

  • Proper use of BaseEntity for all entities
  • Response wrapping with Response<T> or PageResponse<T>
  • Constructor injection via @RequiredArgsConstructor
  • @Transactional usage (readOnly for queries)
  • Method-level security with @PreAuthorize
  • Proper JWT validation in security filter

Learning Resources

For detailed examples, see:

For system architecture overview:

Pattern Documentation

For deep dives into specific patterns: