Apache camel I';我与camel http4端点有问题
Spring上下文:Apache camel I';我与camel http4端点有问题,apache-camel,Apache Camel,Spring上下文: <bean id="customRouteA" class="com.xxx.CustomRouteABean" /> <camelContext id="solr" xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="activemq:topic:agent" /> <to uri="bean:cu
<bean id="customRouteA" class="com.xxx.CustomRouteABean" />
<camelContext id="solr" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="activemq:topic:agent" />
<to uri="bean:customRouteA"/>
</route>
</camelContext>
不断获取错误:
2085 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customRouteA' defined in ServletContext resource [/WEB-INF/application-context.xml]: Initialization of bean failed; nested exception is org.apache.camel.spring.GenericBeansException: Error post processing bean: customRouteA; nested exception is org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: http4://localhost/camel-route-test.php?bridgeEndpoint=true due to: null
我有另一个bean,它具有相同的设置,工作正常,我这里缺少什么?并且类路径上有camel-http4及其依赖的jar 是的,它在maven pom.xml,org.apache.camel-http4 2.10.2是的,它在maven pom.xml,org.apache.camel-http4 2.10.2中,我试图将uri直接放在xml路由中,它没有抱怨:我有其他路由,但他们不应该互相影响,对吗?谢谢你的帮助。原来http4在我的设置中工作得不太好,当我切换到http时,它就工作了。还不知道为什么。
2085 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customRouteA' defined in ServletContext resource [/WEB-INF/application-context.xml]: Initialization of bean failed; nested exception is org.apache.camel.spring.GenericBeansException: Error post processing bean: customRouteA; nested exception is org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: http4://localhost/camel-route-test.php?bridgeEndpoint=true due to: null