Config Toolkit <a href="https://github.com/dangdangdotcom/config-toolkit#%E4%BE%9D%E8%B5%96"></a>依赖<a href="https://github.com/dangdangdotcom/config-toolkit#%E6%A8%A1%E5%9D%97">& 介绍
Config Toolkit 是大型集群和分布式应用配置工具包。Config toolkit 用于简化从本地配置文件到
zookeeper 的迁移。
在大型集群和分布式应用中,配置不宜分散到集群结点中,应该集中管理.
依赖
-
JAVA 7+
-
TOMCAT 7+ for ConfigWeb
模块
特性
Quick
Start
zookeeper)load properties from zookeeper
ZookeeperConfigProfile configProfile = new ZookeeperConfigProfile("zoo.host1:8181", "/projectx/modulex", "1.0.0"); GeneralConfigGroup propertyGroup1 = new ZookeeperConfigGroup(configProfile, "property-group1");
classpath-file)load properties from classpath file
FileConfigProfile configProfile = new FileConfigProfile("UTF8", "properties"); ConfigGroup configGroup = new FileConfigGroup(configProfile, "classpath:property-group1.properties");
from-classpath-file)load xml properties from classpath file
FileConfigProfile configProfile = new FileConfigProfile("UTF8", "xml"); ConfigGroup configGroup = new FileConfigGroup(configProfile, "classpath:property-group1.xml");
file)load properties from file
FileConfigProfile configProfile = new FileConfigProfile("UTF8", "properties"); ConfigGroup configGroup = new FileConfigGroup(configProfile, "file:/Users/yuxuanwang/Work/git/config-toolkit/config-toolkit-demo/src/main/resources/property-group1.properties");
http)load properties from http
FileConfigProfile configProfile = new FileConfigProfile("UTF8", "properties"); ConfigGroup configGroup = new FileConfigGroup(configProfile, "http://crnlmchina.github.io/config-group.properties");
Config Toolkit <a href="https://github.com/dangdangdotcom/config-toolkit#%E4%BE%9D%E8%B5%96"></a>依赖<a href="https://github.com/dangdangdotcom/config-toolkit#%E6%A8%A1%E5%9D%97">& 官网
https://github.com/dangdangdotcom/config-toolkit
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。