0

I have onException configured in one DefaultRouteBuilder class. I want this onException in all other routes in my context. My doubt is whether I should inherit DefaultRouteBuilder in all other routes and calling super.configure() in configure() method or to inject DefaultRouteBuilder defaultRoute in all other RouteBuilder classes and calling defaultRoute.configure() in configure() method. Which one should be appropriate?

4

1 回答 1

1

全局 onException DSL 仅在同一个 RouteBuilder 内工作,因为 camelcontext 单独处理 routebuilder 实例。

于 2014-03-04T07:22:07.967 回答