Go-Frame链接Nacos配置中心解决方案
Go-Frame框架暂时不能链接nacos作为配置中心.官方提供的set方法使用起来也比较麻烦.但是可以剑走偏锋,在启动服务前做一次从nacos上拉取配置,然后保存为本地配置文件,然后启动的时候指定配置文件的操作来解决问题const filePath = "./config.toml"type nacos struct { dataId, groupId, configFilePath string}//初始化func GetNacos(dataId, groupId string)
原创
2021-05-15 19:37:05 ·
770 阅读 ·
0 评论