xuxueli / xxl-conf

A lightweight distributed configuration management platform. (分布式配置管理平台XXL-CONF)
http://www.xuxueli.com/xxl-conf/
GNU General Public License v3.0
666 stars 371 forks source link

建议 #20

Closed maodeng8888 closed 6 years ago

maodeng8888 commented 6 years ago

1.希望兼容 xxl-conf.propertie或者xxl-conf.yml 的配置形式; 2.建议xxl-conf.propertie 的配置改为类似xxl-job 配置文件的读取形式application.properties ,以便适用多环境配置时候比如application-dev.yml,application-test.yum ,采用xxl-conf.propertie 的里面的zookeeper 配置不能适用多环配置; 3、建议增加针对动态日志配置的专项功能,具体到包日志级别 public static void testLog(String key, String level){ LoggerContext loggerContext= (LoggerContext) LoggerFactory.getILoggerFactory(); if (!StringUtils.isEmpty(key)) { //设置某个类日志级别-可以实现定向日志级别调整 ch.qos.logback.classic.Logger vLogger = loggerContext.getLogger(key); if (vLogger!=null) { vLogger.setLevel(Level.toLevel(level2)); } } }

xuxueli commented 6 years ago

你好,感谢反馈!

失败原因是因为 “XxlConfFactory” 继承 “BeanDefinitionRegistryPostProcessor” ,它初始化时间非常早,优先于 “application.properties” 中配置初始化,所以无法获取 “application.properties” 中的配置。

xuxueli commented 6 years ago

@maodeng8888 你好,最新master代码,已经解决了你提到的 “问题1“ 和 ”问题2”,已经支持读取 “application.properties” 中的配置数据,可以pull最新代码体验下。

今日将会发布新版本,将会包含上述优化。