title: No qualifying bean of type 'org.springframework.jms.core.JmsTemplate'
body: <p>I have following dependencies:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-activemq&lt;/artifactId&gt;
      &lt;version&gt;1.5.10.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-jms&lt;/artifactId&gt;
      &lt;version&gt;5.0.3.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>and following source code:</p>
  
  <pre><code>@SpringBootApplication
  @EnableJms
  public class ArApplication {
  
      @Autowired
      private JmsTemplate jmsTemplate;
  
      private static final Logger logger = LoggerFactory.getLogger(ArApplication.class);
  
  
      public static void main(String[] args) throws InterruptedException {
  
          ConfigurableApplicationContext context = SpringApplication.run(Application.class, args);
          JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class);
          jmsTemplate.convertAndSend("robotCommand", "test");
  
      }    
      public ConnectionFactory jmsConnectionFactory() {
          ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");
          return connectionFactory;
      }
  
  }
  </code></pre>
  
  <p>And my application could not start:</p>
  
  <pre><code>Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.jms.core.JmsTemplate' available
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:353)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:340)
      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1092)
      at pack.ArApplication.main(ArApplication.java:34)
  </code></pre>
  
  <p>What the reason?</p>