在我现有的代码中,我在camelcontext
bean
<camelContext xmlns="http://camel.apache.org/schema/spring">
<routeBuilder ref="routeBuilder1" />
<routeBuilder ref="routeBuilder2" />
</camelContext>
我想根据系统配置属性中配置的标志值设置路由构建器。
答案 0 :(得分:0)
您可以在属性中定义routeBuilder1.enabled = true,然后使用:
@Value("${routeBuilder1.enabled}")
private boolean routeEnabled;
@Override
public void configure() throws Exception {
from("..")
.autoStartup(routeEnabled)
.to("...")
}