super-diamond配置管理系統

super-diamond

  • 配置管理系統提供系統參數配置管理,例如數據庫的配置信息等,配置參數修改之後能夠實時推送到客戶端(基於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-server 安裝

  1. 下載super-diamond代碼: git clone https://github.com/melin/super-diamond.git數據庫

  2. 進入super-diamond目錄,構建super-diamond父工程: mvn installoracle

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

  4. 在conf\META-INF\scripts目錄中,提供mysql和oracle建表腳本,理論也支持其它數據庫,在conf\META-INF\res\config-production.properties文件中修改數據庫配置。spa

  5. 在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

  6. 訪問super-diamond-server,jetty默認端口爲8090,能夠在:conf/META-INF/res/jetty.properties中修改。 http://localhost:8090/superdiamond

注意:項目的中的sql查詢存在大小寫差別,所以,在linux下,須要設置mysql的大小寫敏感

lower_case_table_names  = 1,再建表。

相關文章
相關標籤/搜索