title: Apache Camel with Spring DSL
body: <p>I'm trying to run a simple application in Apache Camel using spring DSL.
  Here is my spring-config.xml</p>
  
  <pre><code>&lt;bean id="jms" class="org.apache.camel.component.jms.JmsComponent"&gt;
      &lt;property name="connectionFactory"&gt;
          &lt;bean class="org.apache.activemq.ActiveMQConnectionFactory"&gt;
              &lt;property name="brokerURL" value="vm://localhost" /&gt;
          &lt;/bean&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  
  &lt;camelContext xmlns="http://camel.apache.org/schema/spring"&gt;
      &lt;route&gt;
          &lt;from uri="file:src/data?noop=true" /&gt;
          &lt;process ref="downloadLogger" /&gt;
          &lt;to uri="jms:incomingOrders" /&gt;
      &lt;/route&gt;
  &lt;/camelContext&gt;
  &lt;bean id="downloadLogger" class="com.test.eip.camel.DownloadLogger"&gt;&lt;/bean&gt;
  </code></pre>
  
  <p>And here is my Java class for testing:</p>
  
  <pre><code>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();
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I can see Hello and hello2 in my console, but my file is not being moved. I think I'm doing something wrong while creating the camel context. Could you please help? Do I need to add routes explicitly to camelContext?</p>