Agent skill · software engineering · affaan-m
springboot-patterns
Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work. Use when building or reviewing a Spring Boot backend — REST layer, services, data access, caching, or async work.
Why this skill is useful
Provides specific Spring Boot patterns and code examples for building REST APIs that the AI wouldn't reliably generate on its own.
What it needs
About 4k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.
What this skill does
Spring Boot Development Patterns Spring Boot architecture and API patterns for scalable, production-grade services. When to Activate Building REST APIs with Spring MVC or WebFlux Structuring controller → service → repository layers Configuring Spring Data JPA, caching, or async processing Adding validation, exception handling, or pagination Setting up profiles for dev/staging/production environments Implementing event-driven patterns with Spring Events or Kafka REST API Structure Repository Pattern (Spring Data JPA) Service Layer with Transactions DTOs and Validation Exception Handling Caching Requires @EnableCaching on a configuration class. Async Processing Requires @EnableAsync on a configuration class. Logging (SLF4J) Middleware / Filters Pagination and Sorting Error-Resilient External Calls Rate Limiting (Filter + Bucket4j) Security Note: The X-Forwarded-For header is untrusted by default because clients can spoof it. Only use forwarded headers when: 1. Your app is behind a trusted reverse proxy (nginx, AWS ALB, etc.) 2. You have registered ForwardedHeaderFilter as a bean 3. You have configured server.forward-headers-strategy=NATIVE or FRAMEWORK in application properties 4. Your proxy is configured to overwrite (not append to) the X-Forwarded-For header When ForwardedHeaderFilter is properly configured, request.getRemoteAddr() will automatically return the correct client IP from the forwarded headers. Without this configuration, use request.getRemoteAddr() directly—it returns the immediate connection IP, which is the only trustworthy value. Background Jobs Use Spring’s @Scheduled or integrate with queues (e.g., Kafka, SQS, RabbitMQ). Keep handlers idempotent and observable. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills affaan-m/springboot-patterns--5378d1