简体   繁体   English

从任何骆驼路线

[英]From Any Camel Route

I'm new to apache Camel, attempting to write a basic test. 我是Apache Camel的新手,正尝试编写基本测试。 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 还有一个拦截器可以使用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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