article: http://confluence.marcuschiu.com/x/6wRDAQ
run zuul gateway proxy
- mvn spring-boot:run -Dspring-boot.run.profiles=zuul -Dstart-class=com.marcuschiu.zuulexample.zuul.ZuulExampleApplication
run api server
- mvn spring-boot:run -Dspring-boot.run.profiles=api -Dstart-class=com.marcuschiu.zuulexample.api.ApiApplication
open browser at:
this hits the API server directly
open browser at:
this hits the zuul server, which then intercepts it and makes a call to
this is because of the application-zuul.yml file:
zuul:
routes:
...
teehee:
path: /teehee/**
url: http://localhost:8080
open browser at:
this hits the zuul server, which then intercepts it and makes a call to
this is because of the application-zuul.yml file:
zuul:
routes:
foos:
path: /default/test
url: http://localhost:8080