create-spring-boot-kotlin-project by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill create-spring-boot-kotlin-project请确保您的系统已安装以下软件:
如果需要自定义项目名称,请修改 download-spring-boot-project-template 中的 artifactId 和 packageName
如果需要更新 Spring Boot 版本,请修改 download-spring-boot-project-template 中的 bootVersion
在终端中运行以下命令并检查 Java 版本
java -version
在终端中运行以下命令以下载 Spring Boot 项目模板
curl https://start.spring.io/starter.zip -d artifactId=${input:projectName:demo-kotlin} -d bootVersion=3.4.5 -d dependencies=configuration-processor,webflux,data-r2dbc,postgresql,data-redis-reactive,data-mongodb-reactive,validation,cache,testcontainers -d javaVersion=21 -d language=kotlin -d packageName=com.example -d packaging=jar -d type=gradle-project-kotlin -o starter.zip
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
在终端中运行以下命令以解压下载的文件
unzip starter.zip -d ./${input:projectName:demo-kotlin}
在终端中运行以下命令以删除下载的 zip 文件
rm -f starter.zip
在终端中运行以下命令以解压下载的文件
unzip starter.zip -d ./${input:projectName:demo-kotlin}
将 springdoc-openapi-starter-webmvc-ui 和 archunit-junit5 依赖项插入 build.gradle.kts 文件
dependencies { implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.8.6") testImplementation("com.tngtech.archunit:archunit-junit5:1.2.1") }
将 SpringDoc 配置插入 application.properties 文件
springdoc.swagger-ui.doc-expansion=none springdoc.swagger-ui.operations-sorter=alpha springdoc.swagger-ui.tags-sorter=alpha
将 Redis 配置插入 application.properties 文件
spring.data.redis.host=localhost spring.data.redis.port=6379 spring.data.redis.password=rootroot
将 R2DBC 配置插入 application.properties 文件
spring.r2dbc.url=r2dbc:postgresql://localhost:5432/postgres spring.r2dbc.username=postgres spring.r2dbc.password=rootroot
spring.sql.init.mode=always spring.sql.init.platform=postgres spring.sql.init.continue-on-error=true
将 MongoDB 配置插入 application.properties 文件
spring.data.mongodb.host=localhost spring.data.mongodb.port=27017 spring.data.mongodb.authentication-database=admin spring.data.mongodb.username=root spring.data.mongodb.password=rootroot spring.data.mongodb.database=test
在项目根目录创建 docker-compose.yaml 并添加以下服务:redis:6、postgresql:17 和 mongo:8。
rootroot./redis_data 挂载到 /datarootroot./postgres_data 挂载到 在 .gitignore 文件中插入 redis_data、postgres_data 和 mongo_data 目录
运行 gradle clean test 命令以检查项目是否正常工作
./gradlew clean test
(可选)使用 docker-compose up -d 启动服务,./gradlew spring-boot:run 运行 Spring Boot 项目,docker-compose rm -sf 停止服务。
让我们一步一步来。
每周安装量
7.3K
仓库
GitHub 星标数
26.7K
首次出现
2026年2月25日
安全审计
安装于
codex7.2K
gemini-cli7.2K
opencode7.2K
cursor7.2K
github-copilot7.2K
kimi-cli7.2K
Please make sure you have the following software installed on your system:
If you need to custom the project name, please change the artifactId and the packageName in download-spring-boot-project-template
If you need to update the Spring Boot version, please change the bootVersion in download-spring-boot-project-template
Run following command in terminal and check the version of Java
java -version
Run following command in terminal to download a Spring Boot project template
curl https://start.spring.io/starter.zip
-d artifactId=${input:projectName:demo-kotlin}
-d bootVersion=3.4.5
-d dependencies=configuration-processor,webflux,data-r2dbc,postgresql,data-redis-reactive,data-mongodb-reactive,validation,cache,testcontainers
-d javaVersion=21
-d language=kotlin
-d packageName=com.example
-d packaging=jar
-d type=gradle-project-kotlin
-o starter.zip
Run following command in terminal to unzip the downloaded file
unzip starter.zip -d ./${input:projectName:demo-kotlin}
Run following command in terminal to delete the downloaded zip file
rm -f starter.zip
Run following command in terminal to unzip the downloaded file
unzip starter.zip -d ./${input:projectName:demo-kotlin}
Insert springdoc-openapi-starter-webmvc-ui and archunit-junit5 dependency into build.gradle.kts file
dependencies { implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.8.6") testImplementation("com.tngtech.archunit:archunit-junit5:1.2.1") }
Insert SpringDoc configurations into application.properties file
springdoc.swagger-ui.doc-expansion=none springdoc.swagger-ui.operations-sorter=alpha springdoc.swagger-ui.tags-sorter=alpha
Insert Redis configurations into application.properties file
spring.data.redis.host=localhost spring.data.redis.port=6379 spring.data.redis.password=rootroot
Insert R2DBC configurations into application.properties file
Let's do this step by step.
Weekly Installs
7.3K
Repository
GitHub Stars
26.7K
First Seen
Feb 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
codex7.2K
gemini-cli7.2K
opencode7.2K
cursor7.2K
github-copilot7.2K
kimi-cli7.2K
97,600 周安装
/var/lib/postgresql/datarootrootroot./mongo_data 挂载到 /data/dbspring.r2dbc.url=r2dbc:postgresql://localhost:5432/postgres spring.r2dbc.username=postgres spring.r2dbc.password=rootroot
spring.sql.init.mode=always spring.sql.init.platform=postgres spring.sql.init.continue-on-error=true
Insert MongoDB configurations into application.properties file
spring.data.mongodb.host=localhost spring.data.mongodb.port=27017 spring.data.mongodb.authentication-database=admin spring.data.mongodb.username=root spring.data.mongodb.password=rootroot spring.data.mongodb.database=test
Create docker-compose.yaml at project root and add following services: redis:6, postgresql:17 and mongo:8.
rootroot./redis_data to /datarootroot./postgres_data to /var/lib/postgresql/datarootrootroot./mongo_data to /data/dbInsert redis_data, postgres_data and mongo_data directories in .gitignore file
Run gradle clean test command to check if the project is working
./gradlew clean test
(Optional) docker-compose up -d to start the services, ./gradlew spring-boot:run to run the Spring Boot project, docker-compose rm -sf to stop the services.