skills-java-spring
π‘ Summary
A comprehensive skill set for building Java Spring Boot applications, catering to both monolithic and microservices architectures.
π― Target Audience
π€ AI Roast: βPowerful, but the setup might scare off the impatient.β
Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress). Run with least privilege and audit before enabling in production.
Java Spring Boot Skill Sets
Bα» skill tα»ng hợp cho AI Coding Assistants, giΓΊp tαΊ‘o ra code Java Spring Boot chαΊ₯t lượng cao.
Tα»ng quan
| Skill Set | MΓ΄ tαΊ£ | PhΓΉ hợp vα»i | |-----------|-------|-------------| | java-spring-skills | Monolithic application | Team nhα», MVP, CRUD apps | | java-spring-microservices | Microservices architecture | Team lα»n, scaling Δα»c lαΊp |
Chα»n bα» skill nΓ o?
BαΊ£ng so sΓ‘nh nhanh
| TiΓͺu chΓ | java-spring-skills | java-spring-microservices | |----------|:------------------:|:-------------------------:| | Team size | 1-5 developers | > 5 developers | | Infrastructure | VM / Simple hosting | Kubernetes / Docker Swarm | | DevOps maturity | Basic CI/CD | Advanced (K8s, Service Mesh) | | Database | Single DB | DB per service | | Message Queue | Optional | Required (Kafka) | | Monitoring | Basic (Actuator) | Distributed tracing | | Deploy complexity | 1 artifact | Multiple services | | Development speed | Nhanh hΖ‘n ban ΔαΊ§u | ChαΊm hΖ‘n ban ΔαΊ§u | | Scaling | Vertical (scale cαΊ£ app) | Horizontal (scale tα»«ng service) | | Cost | ThαΊ₯p | Cao hΖ‘n |
Decision Flowchart
ββββββββββββββββββββββββββ
β ΔΓ‘nh giΓ‘ dα»± Γ‘n cα»§a bαΊ‘n β
βββββββββββββ¬βββββββββββββ
β
ββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β TEAM SIZE β β INFRASTRUCTURE β β REQUIREMENTS β
βββββββββββββββββ€ βββββββββββββββββββ€ βββββββββββββββββββ€
β > 5 devs? β β CΓ³ K8s/Docker β β Scale Δα»c lαΊp? β
β Multi-team? β β Swarm? β β Fault isolation?β
β Δα»c lαΊp deployβ β CΓ³ Kafka? β β Multi-domain? β
β tα»«ng team? β β DevOps mature? β β High traffic? β
βββββββββ¬ββββββββ ββββββββββ¬βββββββββ ββββββββββ¬βββββββββ
β β β
βββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββ
β
βββββββββββββββββ΄ββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββ βββββββββββββββββββββββ
β β₯ 2 cΓ’u trαΊ£ lα»i β β < 2 cΓ’u trαΊ£ lα»i β
β lΓ YES β β lΓ YES β
ββββββββββββ¬βββββββββββ ββββββββββββ¬βββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββ βββββββββββββββββββββββ
β java-spring- β β java-spring-skills β
β microservices β β (Monolithic) β
βββββββββββββββββββββββ βββββββββββββββββββββββ
DΓΉng java-spring-skills khi:
Team & Organization:
- Team 1-5 developers
- Single team ownership
- Startup giai ΔoαΊ‘n ΔαΊ§u, MVP
Infrastructure:
- Deploy trΓͺn VM hoαΊ·c simple hosting
- ChΖ°a cΓ³ Kubernetes/Docker orchestration
- ChΖ°a cΓ³ message queue (Kafka/RabbitMQ)
- DevOps team nhα» hoαΊ·c chΖ°a cΓ³
Requirements:
- CRUD application
- Traffic vα»«a phαΊ£i
- KhΓ΄ng cαΊ§n scale tα»«ng module riΓͺng
- Muα»n time-to-market nhanh
DΓΉng java-spring-microservices khi:
Team & Organization:
- Team > 5 developers
- Multiple teams, mα»i team own 1-2 services
- CαΊ§n deploy Δα»c lαΊp giα»―a cΓ‘c team
Infrastructure:
- ΔΓ£ cΓ³ Kubernetes hoαΊ·c Docker Swarm
- ΔΓ£ cΓ³ Kafka/message queue
- CΓ³ DevOps team vα»i experience vα» container orchestration
- CΓ³ budget cho infrastructure phα»©c tαΊ‘p hΖ‘n
Requirements:
- High traffic, cαΊ§n scale horizontal
- Fault isolation (1 service fail khΓ΄ng αΊ£nh hΖ°α»ng cαΊ£ hα» thα»ng)
- Multiple domains vα»i business logic phα»©c tαΊ‘p
- Polyglot persistence (mα»i service cΓ³ thα» dΓΉng DB khΓ‘c nhau)
java-spring-skills (Monolithic)
java-spring-skills/
βββ src/main/java/com/company/app/
β βββ domain/ # Entities, Repositories
β βββ application/ # Services, DTOs
β βββ infrastructure/ # JPA, External APIs
β βββ interfaces/ # Controllers
βββ src/test/ # Unit + Integration tests
βββ pom.xml # Maven build
Quick Start
cd java-spring-skills # Build mvn clean compile # Test (18 tests) mvn test # Run mvn spring-boot:run
TΓnh nΔng
- DDD package structure
- TDD vα»i Mockito
- Maven profiles (dev, prod, docker)
- Optional Docker support
- Spring Data JPA + Flyway
- Bean Validation
- Global Exception Handling
java-spring-microservices
java-spring-microservices/
βββ services/ # Microservices
β βββ user-service/
β βββ order-service/
β βββ gateway-service/
βββ shared/ # Shared Libraries
β βββ common-lib/ # DTOs, Exceptions
β βββ event-lib/ # Domain Events
β βββ api-contracts/ # OpenAPI specs
βββ infrastructure/
β βββ docker/ # Docker Compose
β βββ kubernetes/ # K8s manifests
βββ tools/generators/ # Service generator
βββ openspec/ # Specifications
Quick Start
cd java-spring-microservices # 1. Build shared libraries mvn install -pl shared/common-lib,shared/event-lib -DskipTests # 2. Start infrastructure cd infrastructure\docker docker-compose up -d # 3. Create new service cd ..\.. .\tools\generators\new-service.ps1 -Name "product" -Type "core" # 4. Run service cd services\product-service mvn spring-boot:run
Service Types
| Type | MΓ΄ tαΊ£ | Command |
|------|-------|---------|
| Core | Business logic + DB | new-service.ps1 -Name "x" -Type "core" |
| Event | Kafka consumer | new-service.ps1 -Name "x" -Type "event" |
| Gateway | API Gateway | Copy tα»« templates |
| BFF | Backend for Frontend | new-service.ps1 -Name "x" -Type "bff" |
Architecture
βββββββββββββββ
β Gateway β :8080
ββββββββ¬βββββββ
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββ ββββββββββββββ ββββββββββββββ
β User β β Order β β Payment β
β Service β β Service β β Service β
βββββββ¬βββββββ βββββββ¬βββββββ βββββββ¬βββββββ
β β β
βββββββββββββββββ΄ββββββββββββββββ
β
βββββββΌββββββ
β Kafka β
βββββββββββββ
AI IDE Support
CαΊ£ 2 bα» skill Δα»u hα» trợ cΓ‘c AI IDE:
| IDE | File |
|-----|------|
| Claude Code | CLAUDE.md |
| Cursor | .cursorrules |
| Windsurf | .windsurfrules |
| GitHub Copilot | .github/copilot-instructions.md |
| Continue.dev | .continuerc.json |
OpenSpec (Spec-First Development)
CαΊ£ 2 bα» skill Δα»u hα» trợ OpenSpec - viαΊΏt spec trΖ°α»c, code sau:
βββββββββββ βββββββββββββββ βββββββββββββ ββββββββ βββββββββββ
β Draft βββββΆβReview/Align βββββΆβ Implement βββββΆβ Ship βββββΆβ Archive β
βproposal β β with AI β β tasks β β β β specs β
βββββββββββ βββββββββββββββ βββββββββββββ ββββββββ βββββββββββ
CαΊ₯u trΓΊc chung:
openspec/
βββ specs/ # Source of truth (current state)
βββ changes/ # Proposed changes (spec-first)
βββ {feature}/
βββ proposal.md # WHY - Rationale
βββ tasks.md # HOW - Checklist
βββ specs/ # WHAT - Delta (ADDED/MODIFIED/REMOVED)
VΓ dα»₯ cΓ³ sαΊ΅n:
- Monolithic:
java-spring-skills/openspec/changes/example-user-registration/ - Microservices:
java-spring-microservices/openspec/changes/example-add-inventory-service/
Technology Stack
| Layer | Technology | |-------|------------| | Language | Java 21 | | Framework | Spring Boot 3.2, Spring Cloud 2023 | | Database | PostgreSQL 16 | | Messaging | Apache Kafka (microservices) | | Caching | Redis | | Build | Maven 3.9+ | | Testing | JUnit 5, Mockito | | Container | Docker | | Orchestration | Kubernetes |
YΓͺu cαΊ§u hα» thα»ng
- Java 21+ (Download)
- Maven 3.9+ (Download)
- Docker Desktop (Download) - Optional cho monolithic, Required cho microservices
Documentation
java-spring-skills
- SKILL.md - Skill overview
- QUICKSTART.md - Getting started
java-spring-microservices
- SKILL.md - Skill overview
- QUICKSTART.md - Getting started
- Architecture Overview
- Event Flows
- OpenSpec
License
MIT License
Pros
- Supports both monolithic and microservices architectures
- Comprehensive documentation and quick start guides
- Utilizes modern technologies like Spring Boot and Kafka
Cons
- Complexity may overwhelm beginners
- Requires understanding of both monolithic and microservices concepts
- Dependency on multiple tools and frameworks
Related Skills
pytorch
SβIt's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.β
agno
SβIt promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.β
nuxt-skills
SβIt's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.β
Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.
Copyright belongs to the original author mduongvandinh.
