java Apache Camel,添加的路由不会抛出异常
我在骆驼和春天的世界里写作
我使用这个recipe以编程方式添加路由
基本上,您可以获得camel上下文,并使用文件添加路由
这就是问题所在:
运行时添加的路由不会触发在Spring读取的上下文文件上设置的任何OnException
总结一下:
- 我有一个spring上下文文件,看起来像:
<camel:camelContext>
<onException id="exceptions">
<handled>
<constant>true</constant>
</handled>
<process ref="logExceptionProcessor"/>
<to uri="activemq:adapterLOG"/>
<process ref="mailSender"/>
</onException>
...
- 在我添加了获取驼峰上下文的路由之后,添加的路由不会抛出
OnException
集李>
你对这种行为有什么建议吗
共 (0) 个答案