The example of an application for working with the microservice architecture based on the Spring Boot / Cloud & Netflix stack:
- Config server & clients
- Eureka discovery server & clients
- Zuul gateway
- Feign client
- Spring OAuth2 authorization server
Note: Configuration files for config-service are here
The list of available API endpoints can be seen in Swagger for services:
-
Start all microservices: config server must be started by the first.
-
Get OAuth token (user or admin):
CURL: curl.exe -X POST -u my-client:my-secret -d "username=admin&password=123456&grant_type=password" https://localhost:8055/oauth/token**
- Send a request with the access token:
CURL: curl.exe -X GET --header "Authorization: Bearer 6b90765e-8d51-4d27-9d98-ab21d8527751" https://localhost:8078/models/dto/00000000-0000-0000-0000-000000000000