スキル一覧に戻る
dallay

spring-boot

by dallay

1🍴 0📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: spring-boot description: > Spring Boot with WebFlux, R2DBC, and reactive patterns for Kotlin. Trigger: When working with controllers, services, repositories, or Spring configuration. allowed-tools: Read, Edit, Write, Glob, Grep, Bash metadata: author: cvix version: "2.0"

Spring Boot Skill

Conventions for Spring Boot backend development with WebFlux, R2DBC, and Kotlin.

Architecture Note: This skill covers the Infrastructure Layer of our Hexagonal Architecture. For domain models, use cases, and overall feature organization, see the hexagonal-architecture skill.

Layer Context

LayerWhat Goes HereSpring Annotations?
DomainEntities, Value Objects, Repository interfacesNO
ApplicationCommands, Queries, Handlers, Use Case servicesNO
Infrastructure (this skill)Controllers, R2DBC repos, Configs, AdaptersYES

When to Use

  • Creating REST controllers (HTTP adapters)
  • Implementing repository adapters (R2DBC implementations)
  • Configuring Spring Security, CORS, caching
  • Wiring application services as Spring beans
  • Writing integration tests with Testcontainers

Quick Reference

Controllers & HTTP Layer

Thin HTTP adapters that delegate to application handlers. No business logic.

Application Layer Wiring

Application services are framework-agnostic; Spring wires them via @Configuration.

Persistence Layer

Repository adapters implementing domain ports with R2DBC.

Cross-Cutting Concerns

HTTP Status Codes

CodeWhen to Use
200 OKSuccessful GET, PUT
201 CreatedSuccessful POST that creates resource
204 No ContentSuccessful DELETE
400 Bad RequestInvalid input, malformed JSON
401 UnauthorizedMissing or invalid auth
403 ForbiddenValid auth but insufficient permissions
404 Not FoundResource doesn't exist
409 ConflictState conflict (duplicate email, etc.)
422 Unprocessable EntityValid syntax but semantic errors
500 Internal Server ErrorUnexpected server errors

Application Profiles

ProfilePurpose
devLocal development, verbose logging, H2/Testcontainers
testAutomated tests, mocked external services
stagingProduction-like, real services
prodProduction, optimized settings, real databases

Anti-Patterns

Anti-PatternWhy It's Wrong
Spring annotations in Application/DomainOnly Infrastructure has Spring dependencies
Business logic in controllersControllers delegate to application handlers
Exposing entities in APIUse DTOs (Request/Response classes)
block() in WebFluxUse coroutines or reactive operators
Generic exception catchingHandle specific exceptions with proper responses
Secrets in codeUse environment variables or secret managers
Domain ports extending Spring interfacesDomain ports are pure Kotlin; adapters use Spring

See WebFlux & Coroutines for reactive anti-patterns.

Commands

# Run application
./gradlew bootRun

# Run with profile
SPRING_PROFILES_ACTIVE=dev ./gradlew bootRun

# Run tests
./gradlew test

# Integration tests only
./gradlew test -PincludeTags=integration

# Build JAR
./gradlew bootJar

Resources

Internal References

External Documentation

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です