美文网首页
spring cloud config 小坑

spring cloud config 小坑

作者: hikaru小刚 | 来源:发表于2017-11-18 23:56 被阅读0次

    文件格式

    建议统一使用yml,对中文支持好,properties需要转码。

    文件编码(统一utf8)

    很多同学喜欢用其他编辑器创建或者编辑yml文件,而未注意编码,造成配置中心获取yml文件错误。

    config server 运行一段时间后获取不到最新的配置文件。

    添加spring.cloud.config.server.git.force-pull=true 强制获取更新.

    config server 运行一段时间后发现获取不到配置.

    默认config server 会将仓库克隆到临时仓库(/tmp),但是tmp目录系统会定时清理,
    更改仓库的目录配置 spring.cloud.config.server.git.basedir=/opt/hnconfig

    相关文章

      网友评论

          本文标题:spring cloud config 小坑

          本文链接:https://www.haomeiwen.com/subject/vnayvxtx.html