Proxy 使用eureka通过zuul代理路由差异
我有两台机器(具有相同的应用程序)注册到eureka服务器。Proxy 使用eureka通过zuul代理路由差异,proxy,routing,netflix-zuul,Proxy,Routing,Netflix Zuul,我有两台机器(具有相同的应用程序)注册到eureka服务器。 对这些服务的所有请求都是通过zuul代理进行的 我的应用程序。我的后端服务的属性是: spring.application.name=core zuul.sensitiveHeaders=Set-Cookie zuul.routes.address.path=/to-address/** zuul.routes.address.url=http://localhost:8888 zuul.routes.service.path=
对这些服务的所有请求都是通过zuul代理进行的 我的应用程序。我的后端服务的属性是:
spring.application.name=core
zuul.sensitiveHeaders=Set-Cookie
zuul.routes.address.path=/to-address/**
zuul.routes.address.url=http://localhost:8888
zuul.routes.service.path=/by-service/**
zuul.routes.service.url=CORE
我的zuul代理的my application.properties是:
spring.application.name=core
zuul.sensitiveHeaders=Set-Cookie
zuul.routes.address.path=/to-address/**
zuul.routes.address.url=http://localhost:8888
zuul.routes.service.path=/by-service/**
zuul.routes.service.url=CORE
我有两个问题:
正如您所见,这是相同的方法(相同的过滤器,相同的应用程序…),只是路由不同。您需要使用
req.getRequestedSessionId()
而不是req.getSession().getId()