Spring Boot

Use when implementing backend Spring Boot 3.3+ applications, services, repositories, and controller layers in Java 21.

SahilKhan30 Updated

File contents

Spring Boot 3.3+ (Java 21) Skill

Purpose

Standardize backend service architecture, Spring Data JPA usage, layer boundaries, and Java 21 features.


1. Rules of Engagement

MANDATORY

  • Use Java 21 features (Records, Pattern Matching, Sealed Classes).
  • Use Spring Data Pageable (org.springframework.data.domain.Pageable) internally in Repository and Service interfaces.
  • Separate DB Entity classes from external REST DTO records.

CONDITIONAL

  • Virtual Threads: Enable Virtual Threads (spring.threads.virtual.enabled=true in application.yml) when high concurrency I/O blocking demands justify it and no thread-local/pinning issues exist.

MUST NOT

  • Expose JPA @Entity classes directly in REST API Controller methods.
  • Use raw Thread.sleep() or un-managed executor pools.

SahilKhan30/claude-skill/tree/main/.claude/skills/backend/spring-boot commit e3ae905f20

Frequently asked questions

npx skillmds@latest add sahilkhan30/spring-boot