配置管理系统提供系统参数配置管理,例如数据库的配置信息等,配置参数修改之后能够实时推送到客户端(基于netty4), 方便系统动态修改运行参数。mysql
能够建多个项目,每一个项目分为三种profile(development、test、production), 可以控制profile 级别的权限。linux
全部参数均由development profile配置,test和production profile继承development profile配置,也能够覆盖其配置。 test和production profile只提供修改功能。git
client 备份配置信息到本地文件系统,若是server不可用,能够使用本地备份。client 可以定时重连server,保证client高可用。github
client 提供ConfigurationListener,当某个属性发生变化(add、update、clear), ConfigurationListener可以接收到ConfigurationEvent。sql
下载super-diamond代码: git clone https://github.com/melin/super-diamond.git数据库
进入super-diamond目录,构建super-diamond父工程: mvn installoracle
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文件中修改数据库配置。spa
在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;
netty
访问super-diamond-server,jetty默认端口为8090,能够在:conf/META-INF/res/jetty.properties中修改。 http://localhost:8090/superdiamond
注意:项目的中的sql查询存在大小写差别,所以,在linux下,须要设置mysql的大小写敏感
lower_case_table_names = 1,再建表。