Spring Boot Project Generator
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_faca7523/springboot-generator.
About this skill
Problem Addressed
When starting a new Spring Boot service, engineers often repeat the same setup work: creating the directory layout, adding configuration, defining a unified response wrapper, handling exceptions, and wiring logging or caching. springboot-generator targets this repetitive scaffolding by generating a standard Spring Boot structure directly in the current working directory, including pom.xml, application.yml, the bootstrap class, exception handlers, and configuration classes, without creating an extra subdirectory.
Core Capabilities
- Parameter confirmation: asks for
groupId,artifactId,version,springBootVersion,packageName, andauthor;groupIdis required, whileartifactIddefaults to the current directory name. - Version mapping: selects compatible
MyBatis Plus,Knife4j, and MySQL Connector versions based on the Spring Boot version. - Unified responses and exceptions: generates
Result,ResultCode,BizException, andGlobalExceptionHandler, with JSR-303 validation support. - Context and pagination: provides
UserContext,UserContextInterceptor, andPageResultfor request-scoped data and paginated queries. - Logging and caching: includes the
ShowLogannotation,ShowLogHandleraspect,CacheDataAnnotation, and caching AOP, with Redis serialization configured. - API documentation: integrates
Knife4j, which can be disabled withknife4j.enable: false.
Boundaries and Notes
- The generated project targets JDK 17, so the local toolchain must be compatible.
- It assumes the current directory is already prepared, because output is written directly there.
- Database settings in
application.ymlstill need to be updated after generation. - Redis-related dependencies can be removed if the service does not use Redis.
- A standard package layout such as
com.company.projectis recommended to avoid naming conflicts during later refactoring.
Use Cases
- Create a Spring Boot workspace in an empty project folder with pom.xml, application.yml, bootstrap class, and base configuration classes.
- Align MyBatis Plus, Knife4j, and MySQL Connector versions for the chosen Spring Boot release before wiring database access.
- Build REST endpoints with generated unified responses, global exception handling, validation, pagination, and user context support.
- Add Redis-backed object caching using the generated cache annotation, cache AOP, and Redis serialization configuration.
Best For
- Engineers starting a new Java backend service who need a standard buildable project layout before writing business logic.
- Teams maintaining enterprise REST APIs that need unified responses, global exception handling, and validation as baseline constraints.
- Backend developers integrating MyBatis Plus and Redis who want pagination, caching, and serialization configured upfront.
- Developers building internal admin consoles who expect logging aspects and Knife4j API docs by default.
Related Skills
Guides Java Spring Boot backend development across REST APIs, data access, security, microservices, testing, deployment, and troubleshooting.
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Restores Lanhu designs to target framework code using schema JSON, design tokens, and image assets.
Automatically detects engineering or competition code, analyzes bugs, vulnerabilities, algorithm complexity, and edge cases, then produces risk-level findings with before/after fixes.