spring-controller

Installation
SKILL.md

Spring REST Controller Scaffold

Generate a $ARGUMENTSController with the following:

  • @RestController and @RequestMapping("/api/$ARGUMENTS") (lowercased plural)
  • CRUD endpoints with proper HTTP verbs and status codes:
    • GET /api/$ARGUMENTS — list (with pagination params)
    • GET /api/$ARGUMENTS/{id} — fetch one (404 on miss)
    • POST /api/$ARGUMENTS — create (201 + Location header)
    • PUT /api/$ARGUMENTS/{id} — update (200 or 404)
    • DELETE /api/$ARGUMENTS/{id} — delete (204)
  • Request and response DTOs for $ARGUMENTS (don't expose the JPA entity directly)
  • @Valid + Jakarta validation annotations on the request DTOs
  • OpenAPI annotations (@Operation, @ApiResponses)
  • Integration tests using @SpringBootTest + MockMvc covering happy path, validation failure, and 404

Conventions

Installs
9
GitHub Stars
306
First Seen
May 14, 2026
spring-controller — kousen/claude-code-training