Skip to content

Distributed Configuration Management Platform / 分布式配置管理平台

License

Notifications You must be signed in to change notification settings

speedyproject/dcmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed Configuration Management Platform

Build Status Dependency Status codebeat badge AUR Maven central

DCMP

  该项目基于Consul作为注册发现,服务端以SpringBoot实现,无代码侵入模式编程,支持原生web应用(Servlet)
,Struts2,SpringProject。使用简单方便,配置自动更新,Git仓库配置文件一旦更改配置数据也
即刻刷新,不需要MQ。低侵入性或无侵入性、强兼容性。

组件

  • config-web 服务端
  • config-client 客户端

如何使用

Maven 引入

 <dependency>
     <groupId>org.nicosoft.config</groupId>
     <artifactId>config-client</artifactId>
     <version>1.0.1</version>
 </dependency>

Spring 项目使用方法,引入config-client包后在resource目录创建config.yml:

 config:
    profile: dev                                    # profile                                            
 token: er34xfwefwerqxrx2                           # 交互的Token可有可无
 consul:
    host: localhost:8500                            # consul 服务器地址
    port: 8080                                      # 本地开放的端口
    check: http://localhost:8080/health             # 心跳检测地址
    serviceId: config-client                        # 服务ID
    serviceName: config-client                      # 服务器名
 filePath: /home/travis/build/speedyproject/dcmp/config-client/repertory # 配置文件临时路径

创建好配置后,运行时在类成员上使用Spring原生@Value("${key}")取值

文档持续更新中。。。。

联系与建议

About

Distributed Configuration Management Platform / 分布式配置管理平台

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages