I'm not having any luck with getting placeholders to resolve, is this supposed to work?
zuul.routes.bar.url=http://localhost:8090/${placeHolder}/api/v1
zuul.routes.bar.path=/${placeHolder}/api/v1/**
Thanks
Comment From: ryanjbaxter
As stated in #917 it might depend on the placeholder value you are trying to resolve.
Comment From: spencergibb
Also, in general, this is a function of Spring Boot. Maybe if you gave us a better idea of what is happening and what your configuration is? (ie where is placeholder defined).
Comment From: arahlf
@ryanjbaxter + @spencergibb I'm trying to do this as well, where {placeHolder} is a path parameter variable (like used in request mappings) that will hold a client identifier of sorts (for a multi-tenant application). Any suggestions, or is there a better/easier way to go about this?
Comment From: ryanjbaxter
Where are you defining ${placeholder}?
Comment From: arahlf
The original example probably shouldn't have had the $ in it. The {placeholder} is just a regular path parameter (like that can be used in request mappings) but is obviously dynamic, since I'm using the path parameter to facilitate multi tenancy in an application. For example:
/customer_abc/api/v1/foo -> http://localhost:8090/customer_abc/api/v1/foo
/customer_123/api/v1/foo -> http://localhost:8090/customer123/api/v1/foo
Essentially I'm trying to avoid having to define a whole set of routes per customer, and just have something like:
/{placeholder}/api/v1/foo -> http://localhost:8090/{placeholder}/api/v1/foo
Comment From: ryanjbaxter
No we do not support that. It sound like a different use case than @jbedalov's original question.
Comment From: arahlf
It's what @jbedalov originally meant, I work with him ;)
I was able to get this working using a custom route locator.
Comment From: zartc
@arahlf it can be done with just a slight modification of the route path and a small redirector microservice. Please see my answer in #2766
Comment From: bhattankit
@arahlf -- Do you mind putting a sample of your custom route locator ?