gateway 网关中开启 微服务名称设置,方便访问

application.properties

spring.cloud.gateway.discovery.locator.enabled=true
spring.cloud.gateway.discovery.locator.lower-case-service-id: true


application.yml

spring:
cloud:
gateway:
discovery: # 微服务名称配置
locator:
enabled: true # 设置为true 请求路径前可以添加微服务名称
lower-case-service-id: true # 允许为小写

你可能感兴趣的:(#,gateway)