I am playing around with Zuul but there seems to be something fundamental I don't understand.
Per the documentation (http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html), The following Zuul configuration should cause all http calls to "/myusers" to be forwarded to the "users" service.
zuul:
routes:
users: /myusers/**
I have a similar scenario but it simply doesn't work. My configuration is:
zuul:
route:
stores: /california/**
The service Id is "stores" and it has a URL called "/hello". When I hit:
http://localhost:8765/california/hello,
I get the Spring Boot 404 error message. However, things work very well if I replace california with stores, resulting in the following configuration:
zuul:
route:
stores: /stores/**
In this case, if I call
http://localhost:8765/stores/hello,
Things work just fine. So, it looks as if the prefix of the URL has to match the ID of the service. Is that the expected behavior? What am I missing?
I am using the Zuul 1.0.0.BUILD-SNAPSHOT. On a aisde note, I did notice that the discovery client is now built in into Zuul. Is there a way to disable it if I don't want to run Eureka?
Oh my goodness, it should of course be
zuul:
routes:
instead of
zuul:
route:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With