Skip to content
Back to skills

Spring Boot Architecture

ASecurity

No. A controller should be a thin web adapter: bind the request, apply `@Valid`, map DTOs, delegate to a service, and select the HTTP response. Business rules, orchestration, and transaction boundaries belong in the service layer. ```java @RestController @RequiredArgsConstructor final class OrderController { private final OrderService service; @PostMapping("/orders") OrderResponse create(@Valid @RequestBody CreateOrderRequest request) { return service.create(request); } } ``` Use immutable re...

  • 549 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
developmentgojavadatabase

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add HoangNguyen0403/agent-skills-standard --skill spring-boot-architecture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Spring Boot Architecture?

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

Security grade badge for Spring Boot Architecture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hoangnguyen0403-spring-boot-architecture-c3589093/badge)](https://www.skillsdirectory.com/skills/hoangnguyen0403-spring-boot-architecture-c3589093)

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
No. A controller should be a thin web adapter: bind the request, apply `@Valid`, map DTOs, delegate to a service, and select the HTTP response. Business rules, orchestration, and transaction boundaries belong in the service layer.

```java
@RestController
@RequiredArgsConstructor
final class OrderController {
    private final OrderService service;

    @PostMapping("/orders")
    OrderResponse create(@Valid @RequestBody CreateOrderRequest request) {
        return service.create(request);
    }
}
```

Use immutable record DTOs for inputs and outputs; do not return `@Entity` instances. A service can coordinate repositories and other domain components and should own `@Transactional` behavior. Keep database access in repositories. Centralize failures with `@RestControllerAdvice` and RFC 7807 `ProblemDetail` rather than duplicating error handling in each controller. This separation prevents fat or god controllers, reduces coupling, and makes business rules testable without an HTTP context.


Files in this skill

  • eval-1.baseline.md777 B
  • eval-1.with-skill.md1.2 KB
  • eval-2.baseline.md690 B
  • eval-2.with-skill.md1.2 KB
  • eval-3.baseline.md694 B
  • eval-3.with-skill.md1004 B
  • trigger-1.md132 B
  • trigger-2.md102 B
  • trigger-3.md126 B
  • trigger-4.md127 B

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.

Comments

Loading comments…