Skip to main content

common-spring-boot-init

快速创建 Spring Boot 项目结构,支持多种数据库和依赖配置

소스 정보

저장소
bage2014/study
최근 소스 활동
2026년 6월 24일 23:18
감지된 SKILL.md 언어
중국어
스타
649
포크
113

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
common-spring-boot-init
description
快速创建 Spring Boot 项目结构,支持多种数据库和依赖配置
trigger
用户请求创建新的 Spring Boot 项目时
disable-when
项目已存在或非 Java 技术栈项目
category
backend
tags
["spring","java","backend","project-init"]
requires
["common-db-design"]
# Spring Boot 项目初始化技能 ## 功能描述 快速创建 Spring Boot 项目结构,支持多种数据库和依赖配置。 ## 何时使用 - 创建新的 Spring Boot 项目 - 快速搭建项目骨架 - 标准化项目结构 ## 核心功能 - 生成标准项目结构 - 配置 pom.xml 依赖 - 创建启动类 - 配置 application.yml - 支持多种数据库(H2/MySQL/PostgreSQL) - 集成 Spring AI ## 输入参数 | 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | projectName | String | 是 | 项目名称 | | groupId | String | 是 | Maven Group ID | | artifactId | String | 是 | Maven Artifact ID | | javaVersion | String | 否 | Java 版本(默认 21) | | database | String | 否 | 数据库类型(h2/mysql/postgresql,默认 h2) | | dependencies | Array | 否 | 额外依赖(spring-web, spring-data-jpa, spring-ai等) | ## 输出格式 ```json { "status": "SUCCESS", "projectName": "my-spring-app", "groupId": "com.example", "artifactId": "my-spring-app", "javaVersion": "21", "database": "h2", "filesCreated": [ "pom.xml", "src/main/java/com/example/MySpringAppApplication.java", "src/main/resources/application.yml", "src/main/resources/schema.sql", "src/test/java/com/example/MySpringAppApplicationTests.java" ], "nextSteps": [ "cd my-spring-app", "mvn spring-boot:run" ] } ``` ## 使用流程 1. 指定项目基本信息 2. 选择数据库类型(开发环境默认 H2) 3. 添加所需依赖 4. 生成项目结构 ## 最佳实践 - 开发环境使用 H2 内存数据库 - 生产环境切换为 MySQL/PostgreSQL - 按需添加依赖,避免冗余 ## 配置要求 ### application.yml 示例 ```yaml server: port: 8080 spring: datasource: url: jdbc:h2:mem:example_db driver-class-name: org.h2.Driver username: sa password: h2: console: enabled: true jpa: hibernate: ddl-auto: update show-sql: true ``` ## 扩展指南 支持添加自定义依赖模板和项目模板。 ## 触发条件
GitHub에서 보기