Commit 1d72aaa4a2a2232e61b577b7d9006e29f67926a9
1 parent
ca158122
更新配置文件
Showing
2 changed files
with
27 additions
and
2 deletions
config.yml
discovery.yml
| @@ -2,7 +2,11 @@ server: | @@ -2,7 +2,11 @@ server: | ||
| 2 | port: 15200 | 2 | port: 15200 |
| 3 | 3 | ||
| 4 | spring: | 4 | spring: |
| 5 | - profiles: development | 5 | + profiles: {spring.profiles.active} |
| 6 | + cloud: | ||
| 7 | + config: | ||
| 8 | + discovery: | ||
| 9 | + enabled: true | ||
| 6 | 10 | ||
| 7 | endpoints: | 11 | endpoints: |
| 8 | restart: | 12 | restart: |
| @@ -12,11 +16,23 @@ endpoints: | @@ -12,11 +16,23 @@ endpoints: | ||
| 12 | health: | 16 | health: |
| 13 | sensitive: false | 17 | sensitive: false |
| 14 | 18 | ||
| 19 | +eureka: | ||
| 20 | + instance: | ||
| 21 | + hostname: discovery | ||
| 22 | + client: | ||
| 23 | + registerWithEureka: true | ||
| 24 | + fetchRegistry: true | ||
| 25 | + serviceUrl: | ||
| 26 | + defaultZone: http://discovery:${server.port}/eureka/ | ||
| 15 | 27 | ||
| 16 | --- | 28 | --- |
| 17 | 29 | ||
| 18 | spring: | 30 | spring: |
| 19 | profiles: production | 31 | profiles: production |
| 32 | + cloud: | ||
| 33 | + config: | ||
| 34 | + discovery: | ||
| 35 | + enabled: true | ||
| 20 | 36 | ||
| 21 | endpoints: | 37 | endpoints: |
| 22 | restart: | 38 | restart: |
| @@ -25,3 +41,12 @@ endpoints: | @@ -25,3 +41,12 @@ endpoints: | ||
| 25 | enabled: true | 41 | enabled: true |
| 26 | health: | 42 | health: |
| 27 | sensitive: false | 43 | sensitive: false |
| 44 | + | ||
| 45 | +eureka: | ||
| 46 | + instance: | ||
| 47 | + hostname: discovery | ||
| 48 | + client: | ||
| 49 | + registerWithEureka: true | ||
| 50 | + fetchRegistry: true | ||
| 51 | + serviceUrl: | ||
| 52 | + defaultZone: http://discovery:${server.port}/eureka/ | ||
| 28 | \ No newline at end of file | 53 | \ No newline at end of file |