Netflix / zuul

Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.
Apache License 2.0
13.51k stars 2.38k forks source link

why zuul2 samples dont have application.yml #519

Closed userAshish closed 2 days ago

userAshish commented 6 years ago

When I try to start zuul2 sample I am always Error: Your request of "passthrough" was not found on redirect platform.

userAshish commented 6 years ago

or any configuration file to define and map paths, I am coming from Zuul1 spring boot world , so this appeared to be way diffrent than what we have in Zuul1 , do we have any migration guide from Zuul1 to zuul2?

tmack8001 commented 6 years ago

tldr; Migrating from spring-cloud-netflix -> zuul/2.x isn't just a swap replacement.

@userAshish spring-boot world had a while set of configurations that would read your application.yml and use zuul/1.x library internally to setup routing with.

In zuul/2.x which isn't spring based (and zuul/1.x wasn't either) and has been called out in spring-boot community not being ported back to spring-cloud-netflix projects (which you are using). This means you would need to take on the static routing rules which you have setup in your previous application.yml and port these. This logic is essentially within a few of the Zuul Filters that are setup in spring-cloud-netflix that you are using today PreDecorationFilter (selecting the ribbon client to proxy to) and SimpleRouteFilter (doing the routing logic itself).

userAshish commented 6 years ago

Thanks @tmack8001 , to port all my entries from application.yml like userpath: path: /user/** url: https://myuser.com stripPrefix: false ....

I dont see any example like this for zuul2, I am currently trying to understand https://github.com/Netflix/zuul/tree/2.1/zuul-sample . can you please guide me to any good example that can help me understand replacement of application.yml entries.

dashprateek commented 6 years ago

@userAshish check this out https://github.com/dashprateek/zuul2-sample

artgon commented 6 years ago

As mentioned, the application.yml is a spring-cloud construct. However the solution that @dashprateek shows above is a good way to get around it.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 days ago

This issue was closed because it has been stalled for 7 days with no activity.