This commit is contained in:
Julien Dubois 2022-10-26 16:53:19 +02:00
Родитель f8f1fb4fa8
Коммит c93525468a
6 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -17,10 +17,10 @@ A typical way to create Spring Boot applications is to use the Spring Initialize
In an __empty__ directory execute the curl command line below:
```bash
curl https://start.spring.io/starter.tgz -d dependencies=web -d baseDir=simple-microservice -d bootVersion=2.7.0 -d javaVersion=17 | tar -xzvf -
curl https://start.spring.io/starter.tgz -d type=maven-project -d dependencies=web -d baseDir=simple-microservice -d bootVersion=2.7.5 -d javaVersion=17 | tar -xzvf -
```
> We force the Spring Boot version to be 2.7.0, and keep default settings that use the `com.example.demo` package.
> We force the Spring Boot version to be 2.7.5, and keep default settings that use the `com.example.demo` package.
## Add a new Spring MVC Controller
@ -130,7 +130,7 @@ If you need to check your code, the final project is available in the ["simple-m
Here is the final script to build and deploy everything that was done in this guide:
```
curl https://start.spring.io/starter.tgz -d dependencies=web -d baseDir=simple-microservice -d bootVersion=2.7.0 -d javaVersion=17 | tar -xzvf -
curl https://start.spring.io/starter.tgz -d type=maven-project -d dependencies=web -d baseDir=simple-microservice -d bootVersion=2.7.5 -d javaVersion=17 | tar -xzvf -
cd simple-microservice
cat > HelloController.java << EOF
package com.example.demo;

Просмотреть файл

@ -23,7 +23,7 @@ The microservice that we create in this guide is [available here](spring-cloud-m
To create our microservice, we will invoke the Spring Initalizer service from the command line:
```bash
curl https://start.spring.io/starter.tgz -d dependencies=web,cloud-eureka,cloud-config-client -d baseDir=spring-cloud-microservice -d bootVersion=2.7.0 -d javaVersion=17 | tar -xzvf -
curl https://start.spring.io/starter.tgz -d type=maven-project -d dependencies=web,cloud-eureka,cloud-config-client -d baseDir=spring-cloud-microservice -d bootVersion=2.7.5 -d javaVersion=17 | tar -xzvf -
```
> This time, we add the `Eureka Discovery Client` and the `Config Client` Spring Boot starters, which will respectively automatically trigger the use of Spring Cloud Service Registry and the Spring Cloud Config Server.

Просмотреть файл

@ -38,7 +38,7 @@ The microservice that we create in this guide is [available here](city-service/)
To create our microservice, we will invoke the Spring Initalizer service from the command line:
```bash
curl https://start.spring.io/starter.tgz -d dependencies=webflux,cloud-eureka,cloud-config-client -d baseDir=city-service -d bootVersion=2.7.0 -d javaVersion=17 | tar -xzvf -
curl https://start.spring.io/starter.tgz -d type=maven-project -d dependencies=webflux,cloud-eureka,cloud-config-client -d baseDir=city-service -d bootVersion=2.7.5 -d javaVersion=17 | tar -xzvf -
```
> We use the `Spring Webflux`, `Eureka Discovery Client` and the `Config Client` Spring Boot starters.

Просмотреть файл

@ -82,7 +82,7 @@ Now that we've provisioned the Azure Spring Apps instance and configured the ser
To create our microservice, we will invoke the Spring Initalizer service from the command line:
```bash
curl https://start.spring.io/starter.tgz -d dependencies=web,data-jpa,mysql,cloud-eureka,cloud-config-client -d baseDir=weather-service -d bootVersion=2.7.0 -d javaVersion=17 | tar -xzvf -
curl https://start.spring.io/starter.tgz -d type=maven-project -d dependencies=web,data-jpa,mysql,cloud-eureka,cloud-config-client -d baseDir=weather-service -d bootVersion=2.7.5 -d javaVersion=17 | tar -xzvf -
```
> We use the `Spring Web`, `Spring Data JPA`, `MySQL Driver`, `Eureka Discovery Client` and the `Config Client` components.

Просмотреть файл

@ -13,7 +13,7 @@ The application that we create in this guide is [available here](gateway/).
To create our gateway, we will invoke the Spring Initalizer service from the command line:
```bash
curl https://start.spring.io/starter.tgz -d dependencies=cloud-gateway,cloud-eureka,cloud-config-client -d baseDir=gateway -d bootVersion=2.7.0 -d javaVersion=17 | tar -xzvf -
curl https://start.spring.io/starter.tgz -d type=maven-project -d dependencies=cloud-gateway,cloud-eureka,cloud-config-client -d baseDir=gateway -d bootVersion=2.7.5 -d javaVersion=17 | tar -xzvf -
```
> We use the `Cloud Gateway`, `Eureka Discovery Client` and the `Config Client` components.

Просмотреть файл

@ -19,7 +19,7 @@ Note how the code we create in this section is endpoint-agnostic. All we specify
To create our microservice, we will invoke the Spring Initalizer service from the command line:
```bash
curl https://start.spring.io/starter.tgz -d dependencies=cloud-feign,web,cloud-eureka,cloud-config-client -d baseDir=all-cities-weather-service -d bootVersion=2.7.0 -d javaVersion=17 | tar -xzvf -
curl https://start.spring.io/starter.tgz -d type=maven-project -d dependencies=cloud-feign,web,cloud-eureka,cloud-config-client -d baseDir=all-cities-weather-service -d bootVersion=2.7.5 -d javaVersion=17 | tar -xzvf -
```
## Add Spring code to call other microservices