bootstrap.yml& application.yml
zuul.SendResponseFilter.post.disable: true
zuul.SendErrorFilter.post.disable: true
zuul.TraceDebugPreFilter.post.disable: true
zuul.ServletDetectionFilter.pre.disable: true
它无效,因为com.netflix.zuul.ZuulFilter#isFilterDisabled
是false
。
但是当我设置命令行时:
-Dzuul.ServletDetectionFilter.pre.disable=true \
-Dzuul.SendResponseFilter.post.disable=true
然后com.netflix.zuul.ZuulFilter#isFilterDisabled
为true
。
怎么回事?如何使bootstrap.yml配置工作?
依赖关系:
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
</dependencies>