Netflix/zuul

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

DeepakChhetri1986 opened this issue · 3 comments

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?

Zuul2 is completely independent and does not support spring

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.

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