Desenvolvendo Serviços de Gerenciamento de Pedidos de Restaurantes com Spring Cloud da DIO
- Java 21
- Spring Framework / Spring Boot (3.3.1)
- Spring Cloud Netflix / Spring Eureka Server and Client (4.1.2)
- Spring Cloud OpenFeign (Http client)
- Rest API
- H2 Database
Eureka Server:
- spring-cloud-starter-netflix-eureka-server
Eureka clients:
- spring-cloud-starter-netflix-eureka-client
- spring-boot-starter-actuator
- spring-boot-admin-starter-server
- spring-boot-starter-web
- spring-boot-starter-data-jpa
- spring-boot-starter-validation
- h2database
- lombok
Order and Delivery services (Eureka clients):
- spring-cloud-starter-openfeign
- Uso de DDD (Domain driven design) nos serviços
- Adicionado camada de service ao invés de usar o repositories diretamente nos controllers dos serviços
- Adicionado mais handlers no global exception handler dos serviços
- Adicionado requests e responses DTOs ao invés de usar diretamente as entities nos controllers dos serviços
- Uso do Jakarta validations nos requests DTOs dos serviços
- Chamadas entre microsserviços para validação dos dados usando Spring Cloud OpenFeign
- Eureka server http://localhost:9090/
- Customers admin http://localhost:8081/applications
- Java 21
-
na raiz do repositório
-
cd restaurant-orders.eureka-server
-
./mvnw package -DskipTests
-
java -jar target/restaurant-orders.eureka-server-0.1.0.jar
-
na raiz do repositório
-
cd restaurant-orders.customer-service
-
./mvnw package -DskipTests
-
java -jar target/restaurant-orders.customer-service-0.1.0.jar
-
na raiz do repositório
-
cd restaurant-orders.order-service
-
./mvnw package -DskipTests
-
java -jar target/restaurant-orders.order-service-0.1.0.jar
-
na raiz do repositório
-
cd restaurant-orders.delivery-service
-
./mvnw package -DskipTests
-
java -jar target/restaurant-orders.delivery-service-0.1.0.jar