Open fireflyhoo opened 7 years ago
` <bean id="disconfMgrBean" class="com.baidu.disconf.client.DisconfMgrBean" destroy-method="destroy">
</bean> <bean id="disconfMgrBean2" class="com.baidu.disconf.client.DisconfMgrBeanSecond" init-method="init" destroy-method="destroy"> </bean> <!-- 使用托管方式的disconf配置(无代码侵入, 配置更改会自动reload)--> <bean id="configproperties_disconf" class="com.baidu.disconf.client.addons.properties.ReloadablePropertiesFactoryBean"> <property name="locations"> <list> <!-- 公共的 --> <value>classpath:/common-config.properties</value> <value>classpath:/dubbo-config.properties</value> <value>classpath:/ejob.properties</value> <value>classpath:/idgenerator-config.properties</value> <value>classpath:/mq-config.properties</value> <value>classpath:/redis-config.properties</value> <value>classpath:/redis-uc-config.properties</value> <value>classpath:/shiro-client-default.properties</value> <!-- uc 自有的 --> <value>classpath:/jdbc.properties</value> <value>classpath:/uc-config.properties</value> </list> </property> </bean> <bean id="propertyConfigurer" class="com.baidu.disconf.client.addons.properties.ReloadingPropertyPlaceholderConfigurer"> <property name="ignoreResourceNotFound" value="true" /> <property name="ignoreUnresolvablePlaceholders" value="true" /> <property name="propertiesArray"> <list> <ref bean="configproperties_disconf"/> </list> </property> </bean>`
类似这样的配置, 修改后不能重载
(⊙o⊙)…,没人鸟我?
@ngloom @MaGonglei @nabilzhang @markyao @knightliao
@fireflyhoo 确实不行,只能在xml中用“${xxxx}”,才会生效,在配置类中用spring的@value注解是不起作用的,如果你实在想这样用,只能手动实现reload方法在回调时拦截你要修改的字段,手动更新这个字段
` <bean id="disconfMgrBean" class="com.baidu.disconf.client.DisconfMgrBean" destroy-method="destroy">
类似这样的配置, 修改后不能重载