npx skills add ...
npx skills add affaan-m/ecc --skill 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.
npx skills add affaan-m/ecc --skill springboot-patterns
Spring Boot architecture and API patterns for scalable, production-grade services.
Requires @EnableCaching on a configuration class.
Requires @EnableAsync on a configuration class.
Security Note: The X-Forwarded-For header is untrusted by default because clients can spoof it.
Only use forwarded headers when:
ForwardedHeaderFilter as a beanserver.forward-headers-strategy=NATIVE or FRAMEWORK in application propertiesX-Forwarded-For headerWhen 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.
Use Spring’s @Scheduled or integrate with queues (e.g., Kafka, SQS, RabbitMQ). Keep handlers idempotent and observable.
spring.mvc.problemdetails.enabled=true for RFC 7807 errors (Spring Boot 3+)@Transactional(readOnly = true) for queries@NonNull and Optional where appropriateRemember: Keep controllers thin, services focused, repositories simple, and errors handled centrally. Optimize for maintainability and testability.