You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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
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?
The text was updated successfully, but these errors were encountered: