gdevby / base-microservices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

base-microservices

Implemented load balancer of configuration git, eureka and test service
To test, you need to run application with command
build every module cd config && mvn clean install
cd eureka && mvn clean install
cd test-service && mvn clean install
cd gateway && mvn clean install
docker compose up
wait one minute and test
and wait 30 seconds and execute http://127.0.0.1:8004/testbalancer, it should be return message with balancer
to test gateway routes http://127.0.0.1:8005/test-service/public/message where test-service name of the service white routes by gateway
//wait minute before test cas services should be registrated.
to test secure endpoint you need to get token with curl curl -u "client-test-service:0T1oDiRDnb18geE1KvD9KSVX6eBlV2AD" -d "grant_type=password&username=user-test-service&password=test" -H "Accept: application/json" -X POST http://localhost:8080/realms/myrealm/protocol/openid-connect/token
and after execute with access_token curl -v -H "Accept: application/json" -H "Authorization: Bearer {TOKEN}" http://127.0.0.1:8005/test-service/secure/message

About

License:Apache License 2.0


Languages

Language:Java 83.7%Language:Dockerfile 16.0%Language:Shell 0.3%