Commit 02d3905cb50e472b19668ed73cb791dbe8a35543
1 parent
5596aa9c
eureka服务发现配置从hostname改为IP
Showing
5 changed files
with
10 additions
and
0 deletions
class-service.yml
| ... | ... | @@ -136,6 +136,7 @@ endpoints: |
| 136 | 136 | eureka: |
| 137 | 137 | instance: |
| 138 | 138 | hostname: class-service |
| 139 | + perferIpAddress: true | |
| 139 | 140 | client: |
| 140 | 141 | registerWithEureka: true |
| 141 | 142 | fetchRegistry: false |
| ... | ... | @@ -205,6 +206,7 @@ endpoints: |
| 205 | 206 | eureka: |
| 206 | 207 | instance: |
| 207 | 208 | hostname: class-service |
| 209 | + perferIpAddress: true | |
| 208 | 210 | client: |
| 209 | 211 | registerWithEureka: true |
| 210 | 212 | fetchRegistry: false | ... | ... |
config.yml
| ... | ... | @@ -58,6 +58,7 @@ endpoints: |
| 58 | 58 | eureka: |
| 59 | 59 | instance: |
| 60 | 60 | hostname: configserver |
| 61 | + perferIpAddress: true | |
| 61 | 62 | client: |
| 62 | 63 | registerWithEureka: true |
| 63 | 64 | fetchRegistry: false |
| ... | ... | @@ -91,6 +92,7 @@ endpoints: |
| 91 | 92 | eureka: |
| 92 | 93 | instance: |
| 93 | 94 | hostname: configserver |
| 95 | + perferIpAddress: true | |
| 94 | 96 | client: |
| 95 | 97 | registerWithEureka: true |
| 96 | 98 | fetchRegistry: false | ... | ... |
discovery.yml
| ... | ... | @@ -48,6 +48,7 @@ endpoints: |
| 48 | 48 | eureka: |
| 49 | 49 | instance: |
| 50 | 50 | hostname: discovery |
| 51 | + perferIpAddress: true | |
| 51 | 52 | client: |
| 52 | 53 | registerWithEureka: false |
| 53 | 54 | fetchRegistry: false |
| ... | ... | @@ -76,6 +77,7 @@ endpoints: |
| 76 | 77 | eureka: |
| 77 | 78 | instance: |
| 78 | 79 | hostname: discovery |
| 80 | + perferIpAddress: true | |
| 79 | 81 | client: |
| 80 | 82 | registerWithEureka: false |
| 81 | 83 | fetchRegistry: false | ... | ... |
gateway.yml
| ... | ... | @@ -116,6 +116,7 @@ ribbon: |
| 116 | 116 | eureka: |
| 117 | 117 | instance: |
| 118 | 118 | hostname: gateway |
| 119 | + perferIpAddress: true | |
| 119 | 120 | client: |
| 120 | 121 | registerWithEureka: true |
| 121 | 122 | fetchRegistry: true |
| ... | ... | @@ -179,6 +180,7 @@ ribbon: |
| 179 | 180 | eureka: |
| 180 | 181 | instance: |
| 181 | 182 | hostname: gateway |
| 183 | + perferIpAddress: true | |
| 182 | 184 | client: |
| 183 | 185 | registerWithEureka: true |
| 184 | 186 | fetchRegistry: false | ... | ... |
user-service.yml
| ... | ... | @@ -94,6 +94,7 @@ endpoints: |
| 94 | 94 | eureka: |
| 95 | 95 | instance: |
| 96 | 96 | hostname: user-service |
| 97 | + perferIpAddress: true | |
| 97 | 98 | client: |
| 98 | 99 | registerWithEureka: true |
| 99 | 100 | fetchRegistry: false |
| ... | ... | @@ -145,6 +146,7 @@ endpoints: |
| 145 | 146 | eureka: |
| 146 | 147 | instance: |
| 147 | 148 | hostname: user-service |
| 149 | + perferIpAddress: true | |
| 148 | 150 | client: |
| 149 | 151 | registerWithEureka: true |
| 150 | 152 | fetchRegistry: false | ... | ... |