简体   繁体   中英

From Any Camel Route

I'm new to apache Camel, attempting to write a basic test. However, I was curious as to whether there was a way to write a route that would accept any "from". For instance, I tried something like:

protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
                from("*").to("mock:result");
         }
    };
}

But I think it didn't work. Is this even allowed in Camel? If so, how would I do it?

Yes this is not possible.

Camel has extensive support for unit testing. Check the online docs at, and check out the advice with etc.

And there is also an interceptor you can use

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM