What problem does it solve?
This Skill addresses the challenge of maintaining consistent, readable, and maintainable Java code within Spring Boot services by providing clear guidelines on naming conventions, immutability, error handling, and project structure.
Core Features & Use Cases
- Standardized Naming: Enforces PascalCase for classes/records and camelCase for methods/fields.
- Immutability: Promotes the use of records and final fields for safer state management.
- Effective Optional Usage: Guides on returning and utilizing
Optional to handle potential null values gracefully.
- Stream Best Practices: Recommends concise stream pipelines for transformations.
- Exception Handling: Advocates for domain-specific unchecked exceptions and wrapping technical ones.
- Project Structure: Outlines a standard Maven/Gradle project layout.
- Code Smells Avoidance: Identifies and suggests alternatives for common code smells like long parameter lists and deep nesting.
- Logging & Null Handling: Provides examples for effective logging and null-safe coding.
- Testing Expectations: Sets standards for testing frameworks and practices.
Quick Start
Apply the Java coding standards to the provided code snippet.