1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- server:
- port: ${SERVER_PORT:8088}
- spring:
- application:
- name: background-gateway
- cloud:
- nacos:
- discovery:
- server-addr: ${NACOS_ADDR:106.55.99.175:8845}
- ip: ${NACOS_IP:127.0.0.1}
- username: ${NACOS_USERNAME:nacos}
- password: ${NACOS_PASSWORD:Nacos@123!}
- gateway:
- discovery:
- locator:
- enabled: true
- lower-case-service-id: true
- routes:
- # 路由id
- - id: gateway-user
- # 匹配后提供服务路由地址
- uri: lb://background-user
- # 断言
- predicates:
- - Path=/user-api/v1/**
- filters:
- - StripPrefix=1
- - id: test
- uri: https://www.baidu.com/
- order: 1
- predicates:
- - Path=/test-api/**
- filters:
- - StripPrefix=1
- # redis:
- # host: ${REDIS_HOST:47.93.102.223}
- # port: ${REDIS_PORT:16379}
- # password: ${REDIS_PASSWORD:1qazZAQ!2}
- # database: ${REDIS_DATABASE:1}
- # lettuce:
- # pool:
- # # 连接池中的最小空闲连接
- # min-idle: 1
- # # 连接池中的最大空闲连接
- # max-idle: 6
- # # 连接池最大连接数(使用负值表示没有限制,不要配置过大,否则可能会影响redis的性能)
- # max-active: 10
- # # 连接池最大阻塞等待时间(使用负值表示没有限制);单位毫秒
- # max-wait: 1000
- # # 关闭超时时间;单位毫秒
- # shutdown-timeout: 200
- redis:
- cluster:
- nodes: ${REDIS_NODES:81.68.234.235:6371,81.68.234.235:6372,81.68.234.235:6373,81.68.234.235:6374,81.68.234.235:6375,81.68.234.235:6376}
- max-redirects: ${REDIS_MAX_REDIRECTS:3}
- password: ${REDIS_PASSWORD:1234}
- lettuce:
- pool:
- max-active: ${redis.maxTotal:200}
- max-wait: ${redis.socketTimeout:100000}
- max-idle: ${redis.maxIdle:100}
- min-idle: ${redis.minIdle:100}
|