您的位置:首页 > 其它

super-diamond配置管理系统

2015-08-29 16:43 246 查看

super-diamond

配置管理系统提供系统参数配置管理,例如数据库的配置信息等,配置参数修改以后可以实时推送到客户端(基于netty4), 方便系统动态修改运行参数。

可以建多个项目,每个项目分为三种profile(development、test、production), 能够控制profile 级别的权限。

所有参数均由development profile配置,test和production profile继承development profile配置,也可以覆盖其配置。 test和production profile只提供修改功能。

client 备份配置信息到本地文件系统,如果server不可用,可以使用本地备份。client 能够定时重连server,保证client高可用。

client 提供ConfigurationListener,当某个属性发生变化(add、update、clear), ConfigurationListener能够接收到ConfigurationEvent。

super-diamond-server 安装

下载super-diamond代码: git clone https://github.com/melin/super-diamond.git

进入super-diamond目录,构建super-diamond父工程: mvn install

super-diamond-server中嵌入jetty运行,构建部署包:mvn install assembly:single -Pproduction,生成super-diamond-server-${version}-bin.tar.gz文件, 解压运行bin/server.sh start命令。

在conf\META-INF\scripts目录中,提供mysql和oracle建表脚本,理论也支持其它数据库,在conf\META-INF\res\config-production.properties文件中修改数据库配置。

在conf_user表中添加用户admin,密码000000的加密值为:670b14728ad9902aecba32e22fa4f6bd, mysql脚本: insert into conf_user(id,USER_code,USER_NAME,PASSWORD,CREATE_TIME) values(1,'admin','admin','670b14728ad9902aecba32e22fa4f6bd',current_timestamp() );
commit;

访问super-diamond-server,jetty默认端口为8090,可以在:conf/META-INF/res/jetty.properties中修改。 http://localhost:8090/superdiamond
注意:项目的中的sql查询存在大小写差异,因此,在linux下,需要设置mysql的大小写敏感

lower_case_table_names = 1,再建表。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  配置管理