SPRING_PROFILES_ACTIVE=native;
ENCRYPT_KEY=my-very-secure-encrypt-key;
SPRING_SECURITY_USER_NAME=dev-usr;
SPRING_SECURITY_USER_PASSWORD=dev-pwd;
CONFIG_PATH=<PROJECT_PATH>/local;
SPRING_PROFILES_ACTIVE=local, config;
CONFIG_SERVER_USR=dev-usr;
CONFIG_SERVER_PWD=dev-pwd;
SPRING_PROFILES_ACTIVE=local, config;
CONFIG_SERVER_USR=dev-usr;
CONFIG_SERVER_PWD=dev-pwd;
You must launch mongodb mysql rabbitmq zipkin
cd local
docker-compose up -d mongodb mysql rabbitmq zipkin
Start all microservice on this order : After you lanch all services :
-
eureka-server
-
config-server
-
gateway
-
oauth-authorization-server
-
all other micorservices
Take a look of eureka http://localhost:8761/ with user 'u' and password 'p'
to encrypt you need to use config-server
curl --user dev-usr:dev-pwd localhost:8888/encrypt -d p
78a8c226ba5f1c4425981b723118be57de56c05bdd78ecef48f25df8cdfc5de1
to decrypt you need to use config-server. For example eureka-password: '{cipher}bf298f6d5f878b342f9e44bec08cb9ac00b4ce57e98316f030194a225fac89fb'
curl --user dev-usr:dev-pwd localhost:8888/decrypt -d bf298f6d5f878b342f9e44bec08cb9ac00b4ce57e98316f030194a225fac89fb
p
obtain un token jwt
curl -k https://writer:secret@localhost:8443/oauth/token -d grant_type=password -d username=dkahn -d password=password
{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJka2FobiIsImV4cCI6MjIwNzA2OTE3NSwiYXV0aG9yaXRpZXMiOlsiUk9MRV9VU0VSIl0sImp0aSI6IjNiNGNhMGViLTJhM2ItNDA3Ny1hMmMzLWI3ZDUzMTRkNTY0OCIsImNsaWVudF9pZCI6IndyaXRlciIsInNjb3BlIjpbInByb2R1Y3Q6cmVhZCIsInByb2R1Y3Q6d3JpdGUiXX0.K93IgO7kD6V-GqtXyF6S-jhxh2HHjzSV_z0rlYiZ4BiH4CfVY7FqswRJDzQIGsifCSe8HKheMhLbvrlMYV1yBv9_Jkn-7XDMYuHwNcDtQIcItabcQlb0o9ft4QsJp4qq3ASAbnuB3ZLIA0HiTmkGdmf9H0X8qcFXEfCrdIO-d-ppdiYTi3ppMD-ZUikTve_vmmdzVVqXbbWeZY_B1G-WcRyIVSE8U2pXijD1CUbEm6XOmr1WB9XtWNsHHae_pL93gYbv3Tobq-R45KqKEyi0rFyRM_x6Feu8_hKtMsVUZNBwHd4vPSDYYTvHY_M0gb_oUrjhzTKI5ghusLiW1S9A-g","token_type":"bearer","expires_in":599999999,"scope":"product:read product:write","jti":"3b4ca0eb-2a3b-4077-a2c3-b7d5314d5648"}%
access to swagger (http://localhost:7000/swagger-ui.html) and copy access_token and test microservice
You can use a script for test all microservices
cd local
./test-em-all.bash
gradle build
cd local
docker-compose build
docker-compose up -d
./test-em-all.bash docker