spring: cloud: discovery: locator: enabled: true lower-case-service-id: true gateway: # 路由数组:指当请求满足什么样的断言时,转发到哪个服务上 routes: - id: wares uri: lb://wares-service # 路由对应的微服务转发地址 服务名称 predicates: - Path=/wares_service/** #如果名字和参数是唯一的,可以将名字参数写在一起 - id: order uri: lb://order-service # 路由对应的微服务转发地址 服务名称 predicates: - Path=/order_service/** #如果名字和参数是唯一的,可以将名字参数写在一起 - id: userCenter uri: lb://userCenter-service predicates: - Path=/userCenter_service/** - id: pension uri: lb://pension-service predicates: - Path=/pension_service/** - id: merchant uri: lb://merchant-service predicates: - Path=/merchant_service/** - id: system uri: lb://system-service predicates: - Path=/system_service/** - id: thirdPartyWares uri: lb://thirdPartyWares-service predicates: - Path=/thirdPartyWares_service/** - id: api uri: lb://api-service predicates: - Path=/api/** - id: poster uri: lb://poster-service predicates: - Path=/poster_service/** - id: sysmanage uri: lb://sysmanage-service predicates: - Path=/sysmanage_service/** redis: host: 60.205.129.253 port: 6379 password: bjtdba database: 6 timeout: 5000 jedis: pool: # 连接池最大连接数(使用负值表示没有限制) max-active: 200 # 连接池最大阻塞等待时间(使用负值表示没有限制) max-wait: -1 # 连接池中的最大空闲连接 max-idle: 8 # 连接池中的最小空闲连接 min-idle: 0 #配置eureka eureka: client: service-url: defaultZone: http://127.0.0.1:8000/eureka/ instance: prefer-ip-address: true #使用ip地址注册 #日志格式化 只输出日期和内容 logging: pattern: console: "%d - %msg%n" level: com: bjtdba: gateWay: DEBUG