@Configuration
@DependsOn(value="cachingConnectionFactory")
public class JmsTemplateConfiguration {
@Value("${wechat.sendmessage.queue}")
private String queueName;
@Value("${wechat.sendmessage.topic}")
private String topicName;
@Value("${spring.jms.pub-sub-domain}")
private boolean isPubSubDomain;
/*** 定义点对点队列
*@return*/
@Bean
public Queue queue() {
return new ActiveMQQueue(queueName);
}
/*** 定义一个主题
*@return*/
@Bean
public Topic topic() {
return new ActiveMQTopic(topicName);
}
private final ObjectProvider destinationResolver;
private final ObjectProvider messageConverter;
private final CachingConnectionFactory cachingConnectionFactory;
@Auto