Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Upgrade Zuul 1.3.1 to zuul 2.1.5 in spring boot application #1484

Open
DeepakChhetri1986 opened this issue Feb 28, 2023 · 1 comment

Comments

@DeepakChhetri1986
Copy link

I am trying to upgrade to Zuul 2.x in spring boot application which is being built using Zuul 1.3.1 library. This Zuul 1.3.1 library was integrated using Spring Cloud wrapper spring-cloud-starter-zuul library. However from articles it seems that Spring Cloud has now stopped integration of Zuul 2.x library.
Now I tried to include zuul-core 2.1.5 maven dependency natively (w/o any wrapper library) in the spring boot application and it resulted in compilation errors. Most of these compilation errors are due to RequestContext class removed from 2.x library.
All the filters are heavily using RequestContext class to
a. get request details like uri and url of incoming request
b. add/modify custom headers in zuulRequestHeaders to propagate to origin server
c. set variable in context that are shared among all the filters.
Also RequestContext is used as a unique element between multiple incoming requests.
I could find that SessionContext class is added in the same pacakge, however from the code difference it does not seem that it is direct replacement for RequestContext class.
Could you please confirm the class that can be used as replacement for RequestContext class?

Also since zuul-core library is natively integrated, w/o Spring Cloud wrapper library, so @EnableZuulProxy annotation is also no longer available. I am not sure how spring boot application will know that the app has to behave as proxy server for incoming requests and has to execute filter chain for every incoming requests and route it to origin server.
Could you please share any reference example/page that mention steps to migrate to Zuul 2.x library natively in Spring Boot application?

@DeepakChhetri1986 DeepakChhetri1986 changed the title Zuul 2 upgrade in spring boot application How to Upgrade Zuul 1.3.1 to zuul 2.1.5 in spring boot application Mar 1, 2023
@2775468731
Copy link

Zuul2 is completely independent and does not support spring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants