请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

config-client 中eureka 配置问题

1 配置文件已经修改 :bootstrap.yml
2 eureka的配置 也 从git中 调整到 bootstrap.yml 中
3 容器可以启动并注册成功 ,但是日志中显示,并没有拉取到git中的配置文件,而且报错

 Fetching config from server at : http://a690050cb982:8888/
2019/7/11 下午6:49:402019-07-11 10:49:40.818  INFO 1 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://a690050cb982:8888/. Will be trying the next url if available
2019/7/11 下午6:49:402019-07-11 10:49:40.819  WARN 1 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://a690050cb982:8888/api-feign/test": a690050cb982; nested exception is java.net.UnknownHostException: a690050cb982
2019/7/11 下午6:49:402019-07-11 10:49:40.822  INFO 1 --- [           main] com.star.ekapi.EkApiApplication          : No active profile set, falling back to default profiles: default
2019/7/11 下午6:49:412019-07-11 10:49:41.940  INFO 1 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=aaeb3741-cd5e-32e9-a8f2-f2a2ec6390f7
2019/7/11 下午6:49:412019-07-11 10:49:41.975  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'com.star.ekapi.TestService' of type [org.springframework.cloud.openfeign.FeignClientFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019/7/11 下午6:49:422019-07-11 10:49:42.070  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$737c6838] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019/7/11 下午6:49:422019-07-11 10:49:42.659  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)

正在回答

插入代码

2回答

你看到容器部署部分了?那应该看到视频里有提到,这是因为没有显示真实的ip, 如果要显示,需要加个配置

1
2
3
eureka:
    instance:
        prefer-ip-address: true


1 回复 有任何疑惑可以回复我~
精慕门9846482 2019-07-12 15:35:12

估计是加载顺序的问题

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号