Spring Boot Verification Loop
Build → static → tests → security → diff gate before PRs and deploys. Detalhes em references/.
When to Activate
- Before opening a pull request for a Spring Boot service
- After major refactoring or dependency upgrades
- Pre-deployment verification for staging or production
- Running full build → lint → test → security scan pipeline
- Validating test coverage meets thresholds
Core Principles
- Build first —
mvn -T 4 clean verify -DskipTests; stop on failure - Static gate — spotbugs + pmd + checkstyle, zero tolerance in prod
- Tests at 80%+ — Mockito units, Testcontainers integration, MockMvc API
- Security scan — dependency CVEs, secrets, System.out, wildcard CORS
- Diff review — no debug logs, correct statuses, report READY/NOT READY
Example
mvn -T 4 clean verify -DskipTests
mvn -T 4 spotbugs:check pmd:check checkstyle:check
mvn -T 4 test && mvn jacoco:report
References
references/build-static.md— Phase 1 build, Phase 2 Maven/Gradle static analysisreferences/tests.md— Phase 3 Mockito, Testcontainers, MockMvc patternsreferences/security-lint.md— Phase 4 CVEs/secrets/findings, Phase 5 Spotlessreferences/report-loop.md— Phase 6 diff review, report template, continuous mode
Checklist
- Build green; static analysis clean
- Tests pass with 80%+ line/branch coverage
- No CVEs, secrets, System.out, or wildcard CORS
- Diff reviewed: errors, statuses, transactions, config docs
- Report emitted: READY or issues listed