Zuul routes cannot be changed dynamically from "url" to "serviceId"
See original GitHub issueI noticed that it is possible to edit routes via Spring cloud Config (or by changing the yml directly) with the same type url
, but it is not possible to change the route to point to a service VIP
Scenario:
- routed defined:
zuul:
ignored-services: "*"
routes:
echo3:
path: /echo3/**
url: http://www.aaa.com
- route shows fine in /admin/routes
- change route to
zuul:
ignored-services: "*"
routes:
echo3:
path: /echo3/**
serviceId: echo-service
- hit /admin/refresh() endpoint. The response mentions that changes were detected about the route
- Problem: /admin/routes still shows the old route, pointing to
url
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Dynamically change the url of a route in Zuul based on query ...
As the title suggests I want to change the url based on a given query parameter. So for example if I request: ......
Read more >8. Router and Filter: Zuul - Spring Cloud
By default, the servlet has an address of /zuul . This path can be changed with the zuul. servlet-path property.
Read more >Routing requests and dynamically refreshing routes using ...
Configuring Spring Cloud Netflix Zuul server to route requests to downstream services. Dynamically refreshing the Zuul routes using Eureka ...
Read more >Fallback for Zuul Route - Baeldung
Zuul is an edge service (or API gateway) from Netflix that provides dynamic routing, monitoring, resiliency, and security.
Read more >Chapter 6. Service routing with Spring Cloud and Zuul
Dynamic routing — B cireesv ytewaag zsn setpnci iigncomn eisrcve steqsrue znq, ... the routes for all the services in your application to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
APPLICATION FAILED TO START
Description:
Field zuulProperties in org.springframework.cloud.netflix.zuul.ZuulConfiguration required a single bean, but 2 were found: - zuul.CONFIGURATION_PROPERTIES: defined in BeanDefinition defined in class path resource [gateway/ApiGatewayConfiguration.class] - zuul-org.springframework.cloud.netflix.zuul.filters.ZuulProperties: defined in null
Action:
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
It worked when adding this code to a configuration class. The idea is to have the
ZuulProperties
bean with@RefreshScope