由于本人使用配置中心较少,公司引入需要远程去读取配置中心相关的配置文件,但是尝试了很多次apollo默认都只是读取properties类型的,无法读取相关的,终于在搭建项目后的两个月解决了读取apollo可以读取yml的问题:
这样就可以读取到写在apollo上的yml文件了
(找了很多博客都没这样的记录…自己踩坑自己记录下)
app:
id: xx-server
apollo:
cacheDir: c:/opt/data/
cluster: PRD217
meta: http://56.x.xx.xx:8020
bootstrap:
enabled: true
namespaces: ${server.name},application.yml
eagerLoad:
enabled: true
server:
name: zuul-server.yml