java-spring-development
Skill275 starsChanged 52 days agoApache-2.0View on GitHub
Java Spring Boot development guidelines with best practices for building robust, secure, and maintainable enterprise applications
In this repository264 other files it gives its agents.
- accessibility-a11ySkill
- alpine-jsSkill
- analytics-data-analysisSkill
- android-developmentSkill
- angular-developmentSkill
- angularSkill
- anime-jsSkill
- anthropic-claude-developmentSkill
- api-developmentSkill
- apollo-graphqlSkill
- aspnet-coreSkill
- astroSkill
- auth0-authenticationSkill
- autogen-developmentSkill
- automl-hyperparameter-optimizationSkill
- aws-developmentSkill
- azureSkill
- backend-developmentSkill
- bash-scriptingSkill
- beautifulsoup-parsingSkill
- bitbucket-workflowSkill
- blazorSkill
- blender-python-addonSkill
- blockchainSkill
- bootstrapSkill
- business-central-developmentSkill
- cheerio-parsingSkill
- chrome-extension-developmentSkill
- ci-cd-best-practicesSkill
- clean-architectureSkill
- clean-codeSkill
- clerk-authenticationSkill
- cloudflare-developmentSkill
- computer-vision-opencvSkill
- convexSkill
- cppSkill
- c-sharpSkill
- cssSkill
- cypressSkill
- data-analysis-jupyterSkill
- data-analystSkill
- data-jupyter-pythonSkill
- deep-learning-pythonSkill
- deep-learning-pytorchSkill
- deep-learningSkill
- deno-typescriptSkill
- design-systemsSkill
- devopsSkill
- django-pythonSkill
- django-rest-api-developmentSkill
- dockerSkill
- dotnetSkill
- drizzle-ormSkill
- drupal-developmentSkill
- elasticsearch-best-practicesSkill
- electron-developmentSkill
- elixirSkill
- embedded-stm32Skill
- esbuild-bundlerSkill
- ethereumSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
31 rules. About 0 are common, 30 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈30
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Write clean, efficient, and well-documented Java code with accurate Spring Boot examples
- Distinctive: line 14
Use Spring Boot 3.x with Java 17+ features (records, sealed classes, pattern matching)
- Distinctive: line 15
Prefer constructor injection over field injection for better testability
- Distinctive: line 16
Follow SOLID principles and RESTful API design patterns
- Distinctive: line 34
Use constructor injection for required dependencies
- Distinctive: line 36
Keep constructors simple and avoid logic in them
- Very specific: line 37
Use @Qualifier when multiple implementations exist
- Distinctive: line 41
Use appropriate HTTP methods (GET, POST, PUT, DELETE, PATCH)
- Distinctive: line 44
Use DTOs to control API contract
- Distinctive: line 51
Use lazy loading appropriately to avoid N+1 queries
- Distinctive: line 53
Use query methods and @Query for custom queries
- Distinctive: line 56
Use Flyway or Liquibase for schema migrations
- Distinctive: line 58
Never modify existing migrations
- Distinctive: line 59
Test migrations in development before production
- Distinctive: line 65
Use BCrypt for password encoding
- Distinctive: line 68
Use HTTPS in production
- Distinctive: line 73
Avoid exposing sensitive information in responses
- Distinctive: line 79
Use JUnit 5 for unit tests
- Distinctive: line 81
Test business logic thoroughly
- Distinctive: line 85
Use @SpringBootTest for integration tests
- Distinctive: line 86
Use MockMvc for web layer testing
- Distinctive: line 87
Test database operations with test containers
- Distinctive: line 93
Use Spring Cache abstraction
- Distinctive: line 99
Use @Async for non-blocking operations
- Distinctive: line 102
Consider using reactive patterns for high concurrency
- Distinctive: line 107
Use SLF4J with Logback
- Distinctive: line 110
Avoid logging sensitive data
- Distinctive: line 113
Use Spring Boot Actuator for health and metrics
- Distinctive: line 120
Use Springdoc OpenAPI for API documentation
- Distinctive: line 121
Document all endpoints with descriptions
- Distinctive: line 123
Keep documentation up to date with code
≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Java Spring Development Best Practices
Core Principles
- Write clean, efficient, and well-documented Java code with accurate Spring Boot examples
- Use Spring Boot 3.x with Java 17+ features (records, sealed classes, pattern matching)
- Prefer constructor injection over field injection for better testability
- Follow SOLID principles and RESTful API design patterns
- Design for microservices architecture suitability
Project Structure
Organize code using the standard layered pattern:
project/
├── controllers/ # REST controllers
├── services/ # Business logic
├── repositories/ # Data access layer
├── models/ # Domain entities and DTOs
└── configurations/ # Spring configurationsDependency Injection
- Use constructor injection for required dependencies
- Leverage
@RequiredArgsConstructorwith Lombok for cleaner code - Keep constructors simple and avoid logic in them
- Use
@Qualifierwhen multiple implementations exist
REST API Design
- Use appropriate HTTP methods (GET, POST, PUT, DELETE, PATCH)
- Return proper HTTP status codes
- Implement consistent error response format
- Use DTOs to control API contract
- Version APIs when needed
Data Access
Spring Data JPA
- Define proper entity relationships (@OneToMany, @ManyToOne, etc.)
- Use lazy loading appropriately to avoid N+1 queries
- Implement pagination for large result sets
- Use query methods and @Query for custom queries
Database Migrations
- Use Flyway or Liquibase for schema migrations
- Version migration scripts properly
- Never modify existing migrations
- Test migrations in development before production
Security
Spring Security
- Implement authentication and authorization properly
- Use BCrypt for password encoding
- Configure CORS appropriately
- Protect endpoints based on roles/permissions
- Use HTTPS in production
Secure Coding
- Validate all user inputs
- Sanitize data to prevent injection attacks
- Avoid exposing sensitive information in responses
- Use parameterized queries
Testing
Unit Testing
- Use JUnit 5 for unit tests
- Mock dependencies with Mockito
- Test business logic thoroughly
- Follow Given-When-Then pattern
Integration Testing
- Use @SpringBootTest for integration tests
- Use MockMvc for web layer testing
- Test database operations with test containers
- Test security configurations
Performance
Caching
- Use Spring Cache abstraction
- Configure appropriate cache providers (Redis, Caffeine)
- Set proper TTL for cached data
- Implement cache eviction strategies
Async Processing
- Use @Async for non-blocking operations
- Configure thread pools appropriately
- Handle exceptions in async methods
- Consider using reactive patterns for high concurrency
Logging and Monitoring
Logging
- Use SLF4J with Logback
- Log at appropriate levels
- Include correlation IDs for tracing
- Avoid logging sensitive data
Monitoring
- Use Spring Boot Actuator for health and metrics
- Export metrics to monitoring systems
- Set up proper health checks
- Monitor application performance
API Documentation
- Use Springdoc OpenAPI for API documentation
- Document all endpoints with descriptions
- Include request/response examples
- Keep documentation up to date with code
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

