본문으로 건너뛰기
cccskills
무료GitHub에 공개

springboot-best-practices

Spring Boot 4.0 patterns for enterprise Java 25 applications

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(10)

  • SKILL.md2.5 KB
  • examples/config-properties-example.java565 B
  • examples/controller-example.java881 B
  • examples/controller-test-example.java1.2 KB
  • examples/entity-example.java481 B
  • examples/exception-handler-example.java1.1 KB
  • examples/repository-example.java584 B
  • examples/repository-test-example.java681 B
  • examples/security-config-example.java1.1 KB
  • examples/service-example.java1.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Rules

1. Project Structure

Layered architecture: controller (REST), service (business logic), repository (data access), model/entity, dto, config, exception.

2. Dependency Injection

Constructor injection preferred. Use @RequiredArgsConstructor with final fields. Avoid field injection with @Autowired.

// GOOD: Constructor injection
@Service
@RequiredArgsConstructor
public class UserService {
    private final UserRepository userRepository;
    private final EmailService emailService;
}

3. REST API Design

@RestController + @RequestMapping. Use @Validated for input, ResponseEntity for responses, proper HTTP status codes.

See examples/controller-example.java for reference implementation.

4. Service Layer

Business logic in services. @Transactional boundaries at service level. Interface + implementation pattern.

See examples/service-example.java for reference implementation.

5. Data Access

Spring Data JPA. @Query or method naming for custom queries. @Entity with proper JPA annotations.

See examples/repository-example.java and examples/entity-example.java for reference implementations.

6. Exception Handling

@RestControllerAdvice for global handling. Domain-specific exceptions with proper HTTP status mapping.

See examples/exception-handler-example.java for reference implementation.

7. Configuration

Profile-based: application-{profile}.yml. @ConfigurationProperties for type-safe config. Externalize sensitive values.

# application.yml
spring:
  profiles:
    active: ${SPRING_PROFILES_ACTIVE:local}
  datasource:
    url: ${DATABASE_URL}
    username: ${DATABASE_USERNAME}
    password: ${DATABASE_PASSWORD}

See examples/config-properties-example.java for type-safe configuration properties.

8. Security

Spring Security with SecurityFilterChain. Externalize secrets. Proper authentication/authorization patterns.

See examples/security-config-example.java for reference implementation.

9. Testing

@WebMvcTest (controller), @DataJpaTest (repository), @SpringBootTest (integration), @MockBean for mocking.

See examples/controller-test-example.java and examples/repository-test-example.java for reference implementations.

Application

Always: constructor injection, layered architecture, DTOs, global exception handling, externalized config, proper security, layer-appropriate tests.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Apache Airflow best practices for DAG authoring, testing, and production deployment

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Alembic migration patterns for naming conventions, safety checks, expand-contract, env.py configuration, and CI integration

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

baekenough의 스킬 모두 보기

이 스킬의 문제 신고