Skip to content

viper集成apollo配置,支持properties,yml配置格式

Notifications You must be signed in to change notification settings

xujun339/go-viper-apollo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

viper + apollo 配置模块,支持配置拉取更新

设置配置文件路径,会扫描出配置文件,以文件名作为namespace

比如application.yml namespace=application

使用方式

初始化配置viper_helper.InitLocalConfig("config")

config目录下的config.properties是配置的根配置,会去判断是否需要启动apollo

viper.remoteprovider.apollo.enable = true 获取配置viper_helper.Configmap["logging-level"].GetViper().AllSettings()

About

viper集成apollo配置,支持properties,yml配置格式

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages