注册的是网线ip
CONFIG-SERVICE n/a (1) (1) UP (1) - 192.168.0.2:8007
根据config-service服务名获取的是wifi的ip
Fetching config from server at : http://10.1.71.88:8007/
c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://10.1.71.88:8007/. Will be trying the next url if available
c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://10.1.71.88:8007/
c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://10.1.71.88:8007/. Will be trying the next url if available
o.s.boot.SpringApplication : Application run failed
eureka:
instance:
ip-address: 192.168.0.2
hostname: 192.168.0.2
eureka:
instance:
preferIpAddress: true
instance-id: 192.168.0.2:${server.port}
appname: config-service
client:
serviceUrl:
defaultZone: http://admin:xxx@192.168.0.2:8008/eureka/
spring:
cloud:
config:
discovery:
enabled: true
service-id: config-service
想根据服务获取到网线的ip,怎么做?