一 介绍
可以使用zuul.ignored-services配置需要忽略的服务,多个用逗号分隔。
二 配置举例
server:
port: 8040
spring:
application:
name: microservice-gateway-zuul
eureka:
client:
service-url:
defaultZone:http://localhost:8761/eureka/
instance:
prefer-ip-address: true
zuul:
ignored-services: microservice-provider-user,microservice-consumer-movie
三 测试
1 启动相关微服务
2 输入
http://localhost:8040/microservice-consumer-movie/user/1,结果如下,说明配置生效。
![](https://i-blog.csdnimg.cn/blog_migrate/66ab8e9daa0c39b0241994f1dd72dfcd.png)