application-dev.yml
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
eureka:
client:
serviceUrl:
defaultZone: http://admin:pwd1029384756@127.0.0.1:20000/eureka
healthcheck:
enabled: true
instance:
lease-expiration-duration-in-seconds: 30 #租期到期时间(默认90秒)
lease-renewal-interval-in-seconds: 10 #租期更新时间间隔(默认30秒)
instance-id: ${spring.cloud.client.ip-address}:${server.port}
prefer-ip-address: true
statusPageUrl: http://127.0.0.1:${server.port}/swagger-ui.html
spring:
cloud:
gateway:
discovery:
locator:
enabled: true
lower-case-service-id: true # 服务名小写
routes:
- id: nafmii-app
uri: lb://nafmii-app
predicates:
- Path=/nafmii-app/**
filters:
- StripPrefix=1 # 加上StripPrefix=1,否则转发到后端服务时会带上nafmii-app前缀
- id: nafmii-admin
uri: lb://nafmii-admin
predicates:
- Path=/nafmii-admin/**
filters:
- StripPrefix=1
zipkin:
base-url: http://localhost:9411
enabled: true
sleuth:
web:
client:
enabled: true
sampler:
probability: 1.0 #zipkin采集率 0.1表示 10%采集率
logging:
config: classpath:logback-spring.xml
nafmii:
log-path: D:/NAFMII