1 Star 0 Fork 1

胡布斯 / wptai-disconf-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

wptai-disconf-client

介绍

基于spring-boot风格,一键式接入百度disconf

软件架构

原百度 disconf 官方式例在 spring-boot 缺陷较多,配置复杂、不简洁、不支持Spring 5.X 等。 wptai-disconf-client 为spring-boot快速接入disconf,优化及支持如下操作:

  1. 优化配置文件,支撑yml格式配置文件
  2. 化简,屏闭百度disconf.property配置文件
  3. 支持Spring 5.X
  4. 支持服务化、镜像配置,支持从环境变量中获取 disconf 相关参数
  5. 一键集成 spring-boot 启动类中一键配置,再无须额外配置

安装教程

  1. xxxx
  2. xxxx
  3. xxxx

接入说明

1. pom 中创建 引用 jar

    <dependency>
		<groupId>com.wptai</groupId>
		<artifactId>wptai-disconf-client</artifactId>
		<version>1.0.0</version>
	</dependency>

2. spring-boot工程 创建 application-wptai.yml

wptai: disconf: enable: true server: url: 114.55.43.83:9554 debug: true retry_times: 3 retry_sleep_seconds: 1 app: name: xy-boot-demo version: 0.0.1 env: rd config: base_scan: com.xy ignore: aoto_reload_files: classpath:application.yml

注释请参考 test/resources 目录下 application-wptai.yml

2. spring-boot工程 application 启动类中加入:

@Import({DisConfig.class})

其它,若需要启动时增加参数,则可如下操作:

-Dwptai.disconf.app.env=rd

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

码云特技

  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. 码云官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解码云上的优秀开源项目
  4. GVP 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
  5. 码云官方提供的使用手册 https://gitee.com/help
  6. 码云封面人物是一档用来展示码云会员风采的栏目 https://gitee.com/gitee-stars/

空文件

简介

spring-boot-disconf 基于spring-boot风格,一键集成 disconf 所需配置 展开 收起
Java
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/hudan870614/wptai-disconf-client.git
git@gitee.com:hudan870614/wptai-disconf-client.git
hudan870614
wptai-disconf-client
wptai-disconf-client
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891