The application is built using Spring Boot and Angular, and it uses a microservices architecture to make
it scalable and maintainable.
it contains 5 services :
Customer Service, Inventory Service, Order Service, Billing Service, Config Service
The backend contains 5 services :
This service contain configuration of all services
Specify the folder of all config files :
spring.cloud.config.server.git.uri=file:///D:/config-git-repo
Start the consul server :
consul agent -server -bootstrap-expect=1 -data-dir=consul-data -ui -bind=@IP
Show all registred services :
http://localhost:8500/
Spring Cloud Gateway It provides a centralized entry point for routing and filtering requests
to microservices in a distributed system, enabling dynamic and scalable routing based on various criteria.
We use dynamic routing :
@Bean
DiscoveryClientRouteDefinitionLocator dynamicRoutes(ReactiveDiscoveryClient rdc,
DiscoveryLocatorProperties dlp){
return new DiscoveryClientRouteDefinitionLocator(rdc, dlp);
}
- Get all Customers :
- Get all Products :
- Get all infos about an order :
vault:
vault server -dev
set VAULT_ADDR=http://127.0.0.1:8200
vault kv put secret/vault-ms user.username=root user.password=1234
vault kv get secret/vault-ms