Build a micro-service framework and test environment-9-router
1 instance
(1) create a micro-service for the sample business
First, rely on spring-boot-starter-web.
Then, modify the Application:
Finally, modify the Application.properties:
(2) create a gateway
First, rely on spring-boot-starter-web, spring-cloud-starter-netflix-zuul.
Then, modify the Application class:
Add filter:
Finally, modify the application.properties:
(3) testing
Start the microservice with port 8090.
Start the gateway, port 8080.
In the browser Chrome, access:
At this point, the gateway command line displays: