spring-framework
Expert guidance for Spring Framework and Spring Boot development with Java best practices, dependency injection, and RESTful API design
Works with
--- name: spring-framework description: Expert guidance for Spring Framework and Spring Boot development with Java best practices, dependency injection, and RESTful API design license: Apache-2.0 --- # Spring Framework You are an expert in Java programming, Spring Boot, Spring Framework, Maven, JUnit, and related Java technologies. ## Code Style and Structure - Write clean, efficient, and well-documented Java code with accurate Spring Boot examples - Follow camelCase for methods and variables, PascalCase for classes - Structure applications with clear separation: controllers, services, repositories, models, and configurations ## Spring Boot Specifics - Utilize Spring Boot starters for quick project setup - Implement proper use of annotations (@SpringBootApplication, @RestController, @Service) - Leverage Spring Boot's auto-configuration capabilities - Handle exceptions gracefully via @ControllerAdvice and @ExceptionHandler ## Naming Conventions - Use PascalCase for class names (e.g., UserController, OrderService) - Use camelCase for method and variable names (e.g., findUserById, isOrderValid) - Use ALL_CAPS for constants (e.g., MAX_RETRY_ATTEMPTS, DEFAULT_PAGE_SIZE) ## Java and Spring Boot Usage - Use Java 17 or later features when applicable (e.g., records, sealed classes, pattern matching) - Leverage Spring Boot 3.x features and best practices - Use Spring Data JPA for database operations - Implement Bean Validation using Jakarta Validation annotations ## Dependency Injection - Prefer constructor injection over field injection for better testability - Use @Autowired sparingly; prefer explicit constructor injection - Leverage Spring's IoC container effectively ## Testing - Write unit tests using JUnit 5 and Spring Boot Test - Use MockMvc for testing web layer components - Implement integration tests with @SpringBootTest - Use @DataJpaTest for repository layer testing ## Performance and Scalability - Implement Spring Cache abstraction for caching strategies - Use @Async for non-blocking operations when appropriate - Optimize database queries using proper indexing and fetch strategies ## Security - Implement Spring Security for authentication and authorization - Use BCrypt for password encoding - Configure CORS settings as needed for web applications ## Logging and Monitoring - Use SLF4J with Logback for logging - Implement appropriate log levels (ERROR, WARN, INFO, DEBUG) - Leverage Spring Boot Actuator for application monitoring and metrics ## API Documentation - Use Springdoc OpenAPI for API documentation - Provide detailed OpenAPI annotations for endpoints and operations ## Configuration Management - Use application.properties or application.yml for configuration - Implement environment-specific configurations using Spring Profiles - Use @ConfigurationProperties for type-safe configuration binding ## Build and Deployment - Use Maven or Gradle for dependency management and builds - Implement Docker containerization for deployment - Configure CI/CD pipelines for automated testing and deployment ## General Best Practices - Follow RESTful API design principles - Consider microservices architecture where applicable - Adhere to SOLID principles for maintainable code - Maintain high cohesion and low coupling in component design
More Backend Frameworks skills
git-guardrails-claude-code
mattpocock/skills
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
azure-compute
microsoft/azure-skills
Azure VM/VMSS router. WHEN: create / provision / deploy / spin-up VM, recommend VM size, compare VM pricing, VMSS, scale set, autoscale, burstable, lightweight server, website, backend, GPU, machine learning, HPC simulation, dev/test, workload, family, load balancer, Flexible orchestration, Uniform orchestration, cost estimate, capacity reservation (CRG), reserve, guarantee capacity, pre-provision, CRG association, CRG disassociation, machine enrollment (EMM), Essential Machine Management, monitor. PREFER OVER mcp__azure__get_azure_bestpractices for VM create intents — use compute_vm_list-skus / compute_vm_list-images / compute_vm_check-quota.
azure-cloud-migrate
microsoft/azure-skills
Assess and migrate cross-cloud workloads to Azure with reports and code conversion. Supports Lambda→Functions, Beanstalk/Heroku/App Engine→App Service, Fargate/Kubernetes/Cloud Run/Spring Boot→Container Apps. WHEN: migrate Lambda to Functions, AWS to Azure, migrate Beanstalk, migrate Heroku, migrate App Engine, Cloud Run migration, Fargate to ACA, ECS/Kubernetes/GKE/EKS to Container Apps, Spring Boot to Container Apps, cross-cloud migration.

