Routes Apache Camel上下文正在启动但未找到路由

Routes Apache Camel上下文正在启动但未找到路由,routes,apache-camel,Routes,Apache Camel,我目前正在尝试在我的项目中实现基于apace camel-spring的路由,并且遇到了一些问题。当我运行我的程序时,我能够让CamelContext自动启动,但我一直得到消息: 总共0条路由,其中0条已启动。 ApacheCamel 2.6.0(CamelContext:Camel-1)在0.790秒内启动 这将显示在日志中 我将发布“骆驼上下文”,也许有人可以指出我误入歧途的地方。我现在迷路了,我真的很想掌握这项技术,因为它听起来确实很强大。我希望这是一个简单的解决办法!如果你还需要什么,请

我目前正在尝试在我的项目中实现基于apace camel-spring的路由,并且遇到了一些问题。当我运行我的程序时,我能够让CamelContext自动启动,但我一直得到消息:

总共0条路由,其中0条已启动。 ApacheCamel 2.6.0(CamelContext:Camel-1)在0.790秒内启动

这将显示在日志中

我将发布“骆驼上下文”,也许有人可以指出我误入歧途的地方。我现在迷路了,我真的很想掌握这项技术,因为它听起来确实很强大。我希望这是一个简单的解决办法!如果你还需要什么,请告诉我

<?xml version="1.0" encoding="UTF-8"?>

<spring:beans xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://camel.apache.org/schema/spring"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:alch="http://service.alchemy.kobie.com/"
xsi:schemaLocation="http://www.springframework.org/schema/beans classpath:META-INF/spring/spring-beans.xsd 
    http://camel.apache.org/schema/spring classpath:META-INF/spring/camel-spring.xsd">

<!-- load properties -->
<spring:bean
    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <spring:property name="locations" value="file:backend.properties" />
</spring:bean>

<spring:bean id="properties"
    class="org.apache.camel.component.properties.PropertiesComponent">
    <spring:property name="location" value="file:backend.properties" />
</spring:bean>

<spring:bean id="jmsConnectionFactory" 
    class="org.apache.activemq.ActiveMQConnectionFactory">
    <spring:property name="brokerURL" value="tcp://0.0.0.0:61616?useLocalHost=true" />
</spring:bean>

<spring:bean id="pooledConnectionFactory" 
    class="org.apache.activemq.pool.PooledConnectionFactory">
    <spring:property name="maxConnections" value="8" />
    <spring:property name="maximumActive" value="500" />
    <spring:property name="connectionFactory" ref="jmsConnectionFactory" />
</spring:bean>

<spring:bean id="jmsConfig" 
    class="org.apache.camel.component.jms.JmsConfiguration">
    <spring:property name="connectionFactory" ref="pooledConnectionFactory"/>
    <spring:property name="transacted" value="false"/>
    <spring:property name="concurrentConsumers" value="1"/>
</spring:bean>

<spring:bean id="activemq" 
    class="org.apache.activemq.camel.component.ActiveMQComponent">
    <spring:property name="configuration" ref="jmsConfig"/>
</spring:bean>

<!-- Loaded Beans -->

<spring:bean id="ExactTargetBean" class="com.backend.trigger.TargetBean" /> 
<spring:bean id="TriggerEmailRequestBean" class="com.requests.TriggerEmailRequest" />


<!-- Camel configuration -->

<camelContext xmlns="http://camel.apache.org/schema/spring">
    <route id="genericMessageHandler" streamCache="true">
        <from uri = "activemq:topic:Test.topic"/>
        <multicast>  
            <to uri = "TargetIntegration" />
        </multicast>
    </route>
     <route>
        <from uri="TargetIntegration" />
            <setProperty propertyName="apiuser">
                <simple>${properties:et.username}</simple>
            </setProperty>
            <setProperty propertyName="password">
                <simple>${properties:et.password}</simple>
            </setProperty>
            <setProperty propertyName="triggerName">
                <constant>WelcomeEmail</constant>
            </setProperty>
            <setProperty propertyName="email">
                <constant>patrick@test.com</constant>
            </setProperty>
            <setProperty propertyName="firstName">
                <constant>Patrick</constant>
            </setProperty>
            <setProperty propertyName="lastName">
                <constant>Archambeau</constant>
            </setProperty>
        <to uri = "xslt:xslt/target-integration.xsl" />
        <log message="Transformed Message : ${in.body}" />

        <setBody>
            <simple>qf=xml&amp;xml=${in.body}</simple>
        </setBody>
        <setHeader headerName="CamelHttpMethod">
            <constant>POST</constant>
        </setHeader>
        <setHeader headerName="Content-type">
            <constant>application/x-www-form-urlencoded</constant>
        </setHeader>
        <setHeader headerName="Connection">
            <simple>close</simple>
        </setHeader>
        <log message="Transformed Message : ${in.body}" />
        <to uri = "{{et.integration.url}}" />
        <log message="Transformed Message : ${in.body}" />
    </route>
</camelContext>

${properties:et.username}
${properties:et.password}
欢迎电子邮件
patrick@test.com
帕特里克
阿坎博
qf=xml&;xml=${in.body}
邮递
应用程序/x-www-form-urlencoded
关闭

首先,您使用的是一个相当旧的Camel版本,最新版本是否相同?还有,你还有其他问题吗?例如,尝试连接ActiveMQ或任何东西时出错?我在连接activemq时没有问题,我可以在本地机器上启动它并访问门户,在那里你可以添加主题/设置队列/向队列发送消息等。我将尝试更新我的所有JAR,看看这是否解决了问题。