Skip to content
Back to skills

Stack Spring Boot

ASecurity

Conventions for the Spring Boot stack (package by feature, constructor injection, ProblemDetail errors, MockMvc and Testcontainers tests, Flyway). Use when adding a controller, service, repository, migration or test in this repo.

  • 24 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 9, 2026
ai-agentsjavabashsqlspringapidatabase

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add JoahanMorales/upiixia-agentic-kit --skill stack-spring-boot --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Stack Spring Boot?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Stack Spring Boot
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/joahanmorales-stack-spring-boot/badge)](https://www.skillsdirectory.com/skills/joahanmorales-stack-spring-boot)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: stack-spring-boot
description: Conventions for the Spring Boot stack (package by feature, constructor injection, ProblemDetail errors, MockMvc and Testcontainers tests, Flyway). Use when adding a controller, service, repository, migration or test in this repo.
---
# Spring Boot stack
Setup and structure: `.uak/stacks/spring-boot/STACK.md`.

| Rule | Why |
|---|---|
| One task = one feature package `<base>/<feature>/` (controller, service, repository, `dto/`) plus its tests | disjoint claims; component scan wires it, nobody edits shared wiring |
| Constructor injection, `final` fields; no field `@Autowired` | testable without a Spring context |
| DTOs as `record`s at the HTTP boundary, validated with `jakarta.validation` (`@Valid`, `@NotBlank`…); entities never leave the service | the contract stays stable when the table changes |
| Errors through the shared `@RestControllerAdvice` as `ProblemDetail`; do not add another advice in a feature | one error shape for every client |
| `@Transactional` on service methods, not on controllers | one place for the unit of work |
| Feature settings in `@ConfigurationProperties(prefix = "app.<feature>")`; never read `System.getenv` in code | config is reviewable and typed |
| Tests: `@WebMvcTest` + MockMvc for controllers, plain JUnit for services, `@DataJpaTest` (marathon: Testcontainers) for repositories | fast tests a reviewer can run per package |
| Migrations: one Flyway file per task, timestamp version `V<yyyyMMddHHmm>__<feature>.sql`, reserved in OWNERS.md; never edit a merged migration, add a new one | Flyway versions are global; edited migrations break every other database |
| New dependencies: ask the owner of `pom.xml` (`uak msg <setup-ID> --kind request`); a feature task does not edit it | one dependency change at a time, reviewed |
| The port comes from `server.port: ${UAK_PORT:8080}`; never hard-code 8080 | agents run in parallel worktrees |
| External calls with timeouts and a labeled fallback (`"demo_data": true`) | the demo survives a dead API |

```bash
bash .uak/bin/q ./mvnw -q -B test -Dtest='com.acme.app.<feature>.**' -Dsurefire.failIfNoSpecifiedTests=false
```
The code map knows Java: `uak map find OrderService`, `uak map users src/main/java/.../common/Money.java`,
`uak map impact ID` (who imports this task's classes).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.