Agent skill
Spring
Every Spring service must satisfy these quality gates before merge.
Stars
10
Forks
1
Install this agent skill to your Project
npx add-skill https://github.com/hivellm/rulebook/tree/main/templates/skills/frameworks/spring
SKILL.md
Spring Boot Framework Rules
CRITICAL: Every Spring service must satisfy these quality gates before merge.
Build & Quality Commands
- Lint/format:
./gradlew checkstyleMainormvn verify - Unit tests:
./gradlew testormvn test - Integration tests:
./gradlew integrationTest(if module exists) - Static analysis:
./gradlew jacocoTestReportto ensure 80%+ coverage
Project Structure
- Keep domain logic in
src/main/java/.../service - Expose REST controllers in
controllerpackages - Isolate configuration classes under
config - Share DTOs via
dtopackage and map with MapStruct where applicable
Implementation Guidelines
- Manage configuration with
application.ymlprofiles (dev/test/prod) - Prefer constructor injection, avoid
@Autowiredfield injection - Wrap transactional operations with
@Transactional - Use
ResponseEntityfor explicit HTTP semantics - Validate inputs using
javax.validationannotations and@Valid
Build Matrix
bash
# Gradle
./gradlew clean check
# Maven
mvn -B clean verify
Additional Checks
- Ensure
application.ymlcontains defaults for new properties - Update Flyway/Liquibase migrations when schema changes
- Keep
READMEand/docs/architecture.mdsynced with new services
Didn't find tool you were looking for?