javascript
java camel dsl,Apache Camel与Spring DSL
我正在嘗試使用spring DSL在Apache Camel中運(yùn)行一個(gè)簡(jiǎn)單的應(yīng)用程序 . 這是我的spring-config.xml
這是我的Java類(lèi)測(cè)試:
public class CamelSpringTest {
public static void main(String[] args) throws Exception {
ApplicationContext appContext = new ClassPathXmlApplicationContext("spring-config.xml");
CamelContext camelContext = SpringCamelContext.springCamelContext(appContext, false);
try {
System.out.println("Hello");
camelContext.start();
} finally {
System.out.println("Hello2");
camelContext.stop();
}
}
}
我可以在我的控制臺(tái)中看到Hello和hello2,但我的文件沒(méi)有被移動(dòng) . 我認(rèn)為在創(chuàng)建駝峰上下文時(shí)我做錯(cuò)了什么 . 能否請(qǐng)你幫忙?我是否需要明確地向camelContext添加路由?
總結(jié)
以上是生活随笔為你收集整理的java camel dsl,Apache Camel与Spring DSL的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 商业医疗保险一年大概多少
- 下一篇: 插u盘无显示怎么办 插U盘后电脑无反应怎