Loading...
Loading...
Compare original and translation side by side
artifactIdpackageNamebootVersionartifactIdpackageNamebootVersionjava -versionjava -versioncurl 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.zipcurl 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.zipunzip starter.zip -d ./${input:projectName:demo-kotlin}unzip starter.zip -d ./${input:projectName:demo-kotlin}rm -f starter.ziprm -f starter.zipunzip starter.zip -d ./${input:projectName:demo-kotlin}unzip starter.zip -d ./${input:projectName:demo-kotlin}springdoc-openapi-starter-webmvc-uiarchunit-junit5build.gradle.ktsdependencies {
implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.8.6")
testImplementation("com.tngtech.archunit:archunit-junit5:1.2.1")
}application.propertiesundefinedspringdoc-openapi-starter-webmvc-uiarchunit-junit5build.gradle.ktsdependencies {
implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.8.6")
testImplementation("com.tngtech.archunit:archunit-junit5:1.2.1")
}application.propertiesundefined
- Insert Redis configurations into `application.properties` file
```properties
- 将Redis配置插入到`application.properties`文件中
```properties
- Insert R2DBC configurations into `application.properties` file
```properties
- 将R2DBC配置插入到`application.properties`文件中
```properties
- Insert MongoDB configurations into `application.properties` file
```properties
- 将MongoDB配置插入到`application.properties`文件中
```properties
- Create `docker-compose.yaml` at project root and add following services: `redis:6`, `postgresql:17` and `mongo:8`.
- redis service should have
- password `rootroot`
- mapping port 6379 to 6379
- mounting volume `./redis_data` to `/data`
- postgresql service should have
- password `rootroot`
- mapping port 5432 to 5432
- mounting volume `./postgres_data` to `/var/lib/postgresql/data`
- mongo service should have
- initdb root username `root`
- initdb root password `rootroot`
- mapping port 27017 to 27017
- mounting volume `./mongo_data` to `/data/db`
- Insert `redis_data`, `postgres_data` and `mongo_data` directories in `.gitignore` file
- Run gradle clean test command to check if the project is working
```shell
./gradlew clean testdocker-compose up -d./gradlew spring-boot:rundocker-compose rm -sf
- 在项目根目录创建`docker-compose.yaml`并添加以下服务:`redis:6`、`postgresql:17`和`mongo:8`。
- redis服务应包含
- 密码`rootroot`
- 端口映射6379到6379
- 卷挂载`./redis_data`到`/data`
- postgresql服务应包含
- 密码`rootroot`
- 端口映射5432到5432
- 卷挂载`./postgres_data`到`/var/lib/postgresql/data`
- mongo服务应包含
- 初始化数据库根用户名`root`
- 初始化数据库根密码`rootroot`
- 端口映射27017到27017
- 卷挂载`./mongo_data`到`/data/db`
- 将`redis_data`、`postgres_data`和`mongo_data`目录添加到`.gitignore`文件中
- 运行gradle clean test命令检查项目是否正常工作
```shell
./gradlew clean testdocker-compose up -d./gradlew spring-boot:rundocker-compose rm -sf