spring-boot-full-stack
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSpring Boot Full Stack Skill
Spring Boot 全栈技能
Overview
概述
This skill provides a complete, modular framework for building Java Spring Boot applications with enterprise-grade features.
本技能提供了一个完整的模块化框架,用于构建具备企业级特性的Java Spring Boot应用。
Quick Start
快速开始
bash
undefinedbash
undefinedMinimal setup (PostgreSQL + JWT only)
Minimal setup (PostgreSQL + JWT only)
mvn clean install -Pminimal
mvn clean install -Pminimal
With Redis caching
With Redis caching
mvn clean install -Dmodule.redis.enabled=true
mvn clean install -Dmodule.redis.enabled=true
Full stack (all modules)
Full stack (all modules)
mvn clean install -Pfull-stack
mvn clean install -Pfull-stack
Run application
Run application
mvn spring-boot:run -Dspring-boot.run.profiles=local
undefinedmvn spring-boot:run -Dspring-boot.run.profiles=local
undefinedModule Selection
模块选择
| Module | Default | Enable Flag |
|---|---|---|
| PostgreSQL | ON | |
| Redis | OFF | |
| Kafka | OFF | |
| RabbitMQ | OFF | |
| OAuth2 | OFF | |
| 模块 | 默认状态 | 启用参数 |
|---|---|---|
| PostgreSQL | 开启 | |
| Redis | 关闭 | |
| Kafka | 关闭 | |
| RabbitMQ | 关闭 | |
| OAuth2 | 关闭 | |
Development Workflow
开发流程
- Spec First: Define specifications in
openspec/specs/ - TDD: Write tests first (RED)
- Implement: Write minimal code (GREEN)
- Refactor: Improve code quality
- Archive: Update specs after implementation
- 先定义规格:在目录下定义规格
openspec/specs/ - 测试驱动开发(TDD):先编写测试(红阶段)
- 实现功能:编写最小化代码(绿阶段)
- 重构:提升代码质量
- 归档:实现完成后更新规格
Docker Options
Docker选项
bash
undefinedbash
undefinedWithout Docker (services installed locally)
Without Docker (services installed locally)
make dev
make dev
With Docker infrastructure
With Docker infrastructure
make dev-docker
make dev-docker
Full Docker deployment
Full Docker deployment
docker compose --profile with-app up -d
undefineddocker compose --profile with-app up -d
undefinedSkills Included
包含的技能
Core (Always enabled)
核心模块(始终启用)
- - Project initialization
spring-project-init - - Maven profiles & BOM
spring-maven-modular - - Global exception handling
spring-error-handling - - Request validation
spring-validation - - Structured logging
spring-logging - - Unit + Integration testing
spring-testing - - TDD with Mockito
spring-tdd-mockito - - Spec-First Development
spring-openspec
- - 项目初始化
spring-project-init - - Maven配置文件与BOM
spring-maven-modular - - 全局异常处理
spring-error-handling - - 请求校验
spring-validation - - 结构化日志
spring-logging - - 单元测试 + 集成测试
spring-testing - - 基于Mockito的TDD
spring-tdd-mockito - - 先定义规格再开发
spring-openspec
Optional
可选模块
- - Redis caching
spring-redis - - Kafka messaging
spring-kafka - - RabbitMQ messaging
spring-rabbitmq - - OAuth2/OIDC
spring-oauth2 - - Role-based access control
spring-rbac - - Docker containerization
spring-docker - - OpenAPI/Swagger
spring-api-docs - - Actuator + Prometheus
spring-monitoring
- - Redis缓存
spring-redis - - Kafka消息队列
spring-kafka - - RabbitMQ消息队列
spring-rabbitmq - - OAuth2/OIDC
spring-oauth2 - - 基于角色的访问控制(RBAC)
spring-rbac - - Docker容器化
spring-docker - - OpenAPI/Swagger
spring-api-docs - - Actuator + Prometheus
spring-monitoring
File Structure
文件结构
src/
├── main/
│ ├── java/
│ │ └── com/company/app/
│ │ ├── config/ # Configuration classes
│ │ ├── controller/ # REST controllers
│ │ ├── service/ # Business logic
│ │ ├── repository/ # Data access
│ │ ├── domain/ # Entities
│ │ ├── dto/ # Data transfer objects
│ │ ├── exception/ # Custom exceptions
│ │ └── security/ # Security configuration
│ └── resources/
│ ├── application.yml
│ ├── application-local.yml
│ ├── application-dev.yml
│ ├── application-prod.yml
│ └── db/migration/ # Flyway migrations
├── test/
│ └── java/
│ └── com/company/app/
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
└── openspec/
├── AGENTS.md
├── specs/ # Feature specifications
└── changes/ # Proposed changessrc/
├── main/
│ ├── java/
│ │ └── com/company/app/
│ │ ├── config/ # Configuration classes
│ │ ├── controller/ # REST controllers
│ │ ├── service/ # Business logic
│ │ ├── repository/ # Data access
│ │ ├── domain/ # Entities
│ │ ├── dto/ # Data transfer objects
│ │ ├── exception/ # Custom exceptions
│ │ └── security/ # Security configuration
│ └── resources/
│ ├── application.yml
│ ├── application-local.yml
│ ├── application-dev.yml
│ ├── application-prod.yml
│ └── db/migration/ # Flyway migrations
├── test/
│ └── java/
│ └── com/company/app/
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
└── openspec/
├── AGENTS.md
├── specs/ # Feature specifications
└── changes/ # Proposed changes