bootstrap.yml不生效,无法从配置中心拉取配置,只拉本地http://localhost:8888
在本地能够跑起来,拉取正确的配置,但是远程构建运行时,启动报错,拉取配置的地址不正确
[ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
[ main] c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://localhost:8888. Will be trying the next url if available
[ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/application/dev": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
[ main] c.c.cldmp.report.ReportApplication : The following profiles are active: test
配置如下
之后参考一篇文章,但是我的 target里的资源位置是正确的,无法给到帮助。
之后是同事解决了这个问题,以下是他修改的代码:
在打包时,将资源全部打包进去,且设置不替换资源中的属性。
对我来说没帮上忙的【文章地址】