#端口号 server: port: 8089 management: endpoint: health: show-details: always endpoints: jmx: exposure: include: '*' web: exposure: include: '*' health: sentinel: enabled: false #spring配置 spring: application: name: nacos-server-gateway profiles: active: dev cloud: gateway: enabled: true #开启网关 discovery: locator: enabled: true #启用DiscoveryClient routes: - id: route1 uri: lb://nacos-server-consumer predicates: - Path=/nacos/consumer/test,/nacos/consumer/index - id: route2 uri: lb://nacos-server-producer predicates: - Path=/service/** filter: - AddRequestHeader=X-Request-Id,12345 nacos: discovery: server-addr: http://120.79.36.53:8848 #服务注册地址 username: nacos password: nacos sentinel: transport: dashboard: 127.0.0.1:8181 port: 8719 #默认端口,如果被占用则从8719依次+1扫描