- Home
- Skills
- Tencentblueking
- Bk Ci
- Backend Microservice Development
backend-microservice-development_skill
- Kotlin
2.5k
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill tencentblueking/bk-ci --skill backend-microservice-development- SKILL.md4.7 KB
Overview
This skill provides practical backend microservice development guidelines focused on Kotlin/Java and Spring Boot for a CI/CD platform. It codifies a four-layer module layout, resource naming, dependency injection, configuration management, and Spring Boot best practices. The goal is to speed up new service creation, ensure consistent architecture, and reduce coupling across services.
How this skill works
It prescribes a standardized module layout: api-{service}, biz-{service}, boot-{service}, and model-{service}, with clear responsibilities for API contracts, business logic/DAO, Spring Boot startup, and data models. It enforces constructor injection, use of Result<T> return wrappers, JOOQ for database access, and API-based inter-service calls only. Developers follow naming conventions, Swagger annotations, validation patterns, and Gradle dependency declarations to produce consistent, documented microservices.
When to use it
- Creating a new backend microservice or adding a new Resource endpoint
- Writing Kotlin or Java backend code for the CI/CD platform
- Designing or refactoring service-to-service call patterns
- Onboarding new team members to service architecture and conventions
- Preparing services for independent deployment with Spring Boot
Best practices
- Organize code into api-, biz-, boot-, and model- modules to separate concerns
- Use constructor injection (@Autowired constructor) for all dependencies
- Expose functionality via Resource interfaces and implement REST resources for web and internal calls
- Declare dependencies explicitly in build.gradle.kts and avoid circular dependencies
- Wrap responses in Result<T>, annotate APIs with Swagger (@Tag/@Operation), and apply field validation
- Never access another service's database directly; always call its API; use JOOQ for DB access instead of handwritten SQL
Example use cases
- Add a UserPipelineResource to expose pipeline list endpoints for web users
- Create a new boot-{service} module to package and deploy a single microservice
- Implement service-to-service endpoints using Service*Resource naming and /service/ path
- Add JOOQ-generated model-{service} objects and implement DAO inside biz-{service}
- Onboard a team member by sharing this checklist to ensure naming, injection, and documentation standards
FAQ
Use prefix conventions: User*Resource for /user/, Service*Resource for /service/, Open*Resource for /open/, Build*Resource for /build/, and Op*Resource for /op/.
Can services access each other's databases?
No. Inter-service communication must go through API interfaces; direct DB access across services is prohibited.