@@ -0,0 +1,1017 @@
+package com.lance.mq.consumer.config;%0A%0Aimport javax.jms.Queue;%0A%0Aimport org.apache.activemq.ActiveMQConnectionFactory;%0Aimport org.apache.activemq.command.ActiveMQQueue;%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.context.annotation.Description;%0Aimport org.springframework.jms.core.JmsTemplate;%0Aimport org.springframework.jms.support.converter.SimpleMessageConverter;%0A%0A@Configuration%0A@Description(value = %22ActiveMQ Configuration%22)%0Apublic class ActiveMQConfig %7B%0A%09public static final String QUEUE_HELLO = %22queue.hello%22;%0A%09%0A%09@Bean(name=%22helloQueue%22)%0A%09public Queue helloQueue() %7B%0A%09%09return new ActiveMQQueue(QUEUE_HELLO);%0A%09%7D%0A%09%0A%09@Bean(name=%22jmsTemplate%22)%0A%09public JmsTemplate jmsTemplate(ActiveMQConnectionFactory connectionFactory ) %7B%0A%09%09JmsTemplate template = new JmsTemplate(connectionFactory);%0A%09%09template.setDefaultDestination(helloQueue());%0A%09%09template.setMessageConverter(new SimpleMessageConverter());%0A%09%09return template;%0A%09%7D%0A%7D%0A

add activemq config