create-spring-boot-kotlin-project

软件研发 后端与 API 1 文件 EN 原文

'Create Spring Boot Kotlin Project Skeleton'

'Create Spring Boot Kotlin Project Skeleton'

说明语言:英文

来源githubawesome-copilot ↗ 查看原文件 ↗版权归原作者,请遵循原仓库许可
安装
npx skills add https://github.com/github/awesome-copilot --skill create-spring-boot-kotlin-project

需要已安装 skills CLI。也可以直接从源仓库 clone。

在星云中查看 ↗
SKILL.md 原文

name: create-spring-boot-kotlin-project description: 'Create Spring Boot Kotlin Project Skeleton' ---

Create Spring Boot Kotlin project prompt

Check Java version

java -version

Download 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

Unzip the downloaded file

unzip starter.zip -d ./${input:projectName:demo-kotlin}

Remove the downloaded zip file

rm -f starter.zip

Unzip the downloaded file

unzip starter.zip -d ./${input:projectName:demo-kotlin}

Add additional dependencies

dependencies {
  implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.8.6")
  testImplementation("com.tngtech.archunit:archunit-junit5:1.2.1")
}
# SpringDoc configurations
springdoc.swagger-ui.doc-expansion=none
springdoc.swagger-ui.operations-sorter=alpha
springdoc.swagger-ui.tags-sorter=alpha
# Redis configurations
spring.data.redis.host=localhost
spring.data.redis.port=6379
spring.data.redis.password=rootroot
# R2DBC configurations
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 configurations
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
./gradlew clean test

Let's do this step by step.

同类技能
api-design-principlescopilot-sdkcreate-spring-boot-java-projectdotnet-backend-patternsdotnet-best-practicesdotnet-timezonedotnet-upgradegolang-graphql
本页内容来自开源项目 github, 版权归原作者所有。
本站仅作技能索引与分享,所有 Skill 版权归其原作者所有。