Spring boot microservices with Authentication and centralized log with ELK
- Java 8
- JPA Mysql
- Mongo DB
- Spring Boot Actuator
- Dev Tools
- Lombok
- Eureka
- Zuul
- Zipkin
- Sleuth
- JWT
- Elasticsearch-Logstash-Kibana
Import dump-app_db.sql to your MySQL
Login to get bearer token from the authentication endpoint /auth/login . Then send a request to access the protected microservices. Zuul Service act like Gateway which does central authentication, redirect an incoming request to other microservices.
Holds the information about all client-service applications.
Configure jwt variable
Validate user credential with phoneNumber or/and email and if validate then generate token, otherwise throw exception
Create microservices that responsible to handle CRUD operation of user.
Create microservices that responsible to handle CRUD operation of product.
Create Gateway-Service (Zuul proxy) Application ,register it in Eureka server, validate token, and centralize authentication incoming request.
Collect and centralized logging in three open source project for analysis in various environments, search indexes, visualize data with charts and graphs
Measure where service has spent more time.
Create Docker Networking to allow multiple containers to communicate with each other.
docker network create interact-spring-boot-services
1. Eureka Service
mvn clean install package -DskipTests
docker image build -t eureka-service --rm=true .
2. Common Service
mvn clean install package -DskipTests
docker image build -t commons-service --rm=true .
3. Authentication Service
mvn clean install package -DskipTests
docker image build -t authentication-service --rm=true .
4. User Service
mvn clean install package -DskipTests
docker image build -t master-user-service --rm=true .
5. Product Service
mvn clean install package -DskipTests
docker image build -t master-product-service --rm=true .
6. Zuul Service
mvn clean install package -DskipTests
docker image build -t zuul-service --rm=true .
docker-compose up --build