Commit c1fc26c23eb503c09b83cc5ec75cdca62e360c55
1 parent
e2617c59
修改eureka注册
Showing
1 changed file
with
14 additions
and
1 deletions
cloud-service.yml
| @@ -60,7 +60,20 @@ ribbon: | @@ -60,7 +60,20 @@ ribbon: | ||
| 60 | ReadTimeout: 5000 | 60 | ReadTimeout: 5000 |
| 61 | ConnectTimeout: 10000 | 61 | ConnectTimeout: 10000 |
| 62 | 62 | ||
| 63 | - | 63 | +eureka: |
| 64 | + instance: | ||
| 65 | + hostname: cloud-service | ||
| 66 | + perferIpAddress: true | ||
| 67 | + instance-id: ${spring.cloud.client.ipAddress}:${server.port} | ||
| 68 | + leaseRenewalIntervalInSeconds: 5 | ||
| 69 | + leaseExpirationDurationInSeconds: 15 | ||
| 70 | + client: | ||
| 71 | + registerWithEureka: true | ||
| 72 | + fetchRegistry: true | ||
| 73 | + serviceUrl: | ||
| 74 | + defaultZone: http://discovery:15200/eureka/ | ||
| 75 | + healthcheck: | ||
| 76 | + enabled: true | ||
| 64 | 77 | ||
| 65 | # 一些公共的常量配置 | 78 | # 一些公共的常量配置 |
| 66 | 79 |