我使用以下 bean 来管理 Camel 中的属性,如下所示:
<bean id="ilePropertiesConfigurer"
class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
<property name="properties" ref="allProperties" />
</bean>
allproperties 是一个 java 类。启动应用程序时效果非常好。
但现在,我想在不重新启动应用程序的情况下更新属性。我更新了所有属性,但它仍然采用旧值。
你能帮我吗?
最佳答案
使用 Spring 属性占位符桥的 Apache Camel 不支持此功能。您需要重新启动您的应用程序。
OSGi Blueprint 的概念是允许在属性更改时重新加载/重新启动应用程序,但它会执行完整的捆绑重新启动命令。
关于java - BridgePropertyPlaceholderConfigurer Camel bean,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49158465/