spring-boot-mvc
Installation
SKILL.md
Spring MVC Request Lifecycle, Filters, and Async
Place each cross-cutting concern in exactly one hook and name the hook in the code. Spring MVC offers several insertion points; picking the wrong one produces work that runs twice, skips the error path, or misses non-controller requests.
When to use
- A
@RestControllerendpoint returns the wrong status, body, or media type. - Deciding between a
Filter, aHandlerInterceptor, a@ControllerAdvice, and an argument resolver, or debugging a hook that does not run. - Adding
Callable,DeferredResult,SseEmitter, orResponseBodyEmitterhandling, and deciding where virtual threads help.
When not to use
- Status codes, problem shapes, and versioning policy belong to
spring-boot-rest-api. - Request and response record shape belongs to
spring-boot-dto. - Bean Validation constraints on bodies and parameters belong to
spring-boot-validation. - Authentication, authorization, and CORS enforcement belong to
spring-boot-security. - Package placement, controller test slices, and MockMvc mechanics belong to
spring-boot-clean-architectureandspring-boot-integration-testing.