letian-tang opened a new issue, #720:
URL: https://github.com/apache/rocketmq-spring/issues/720

   没有被执行
   @Bean(destroyMethod = "destroy")
       @Conditional(ProducerOrConsumerPropertyCondition.class)
       @ConditionalOnMissingBean(name = ROCKETMQ_TEMPLATE_DEFAULT_GLOBAL_NAME)
       public RocketMQTemplate rocketMQTemplate(RocketMQMessageConverter 
rocketMQMessageConverter) {
           RocketMQTemplate rocketMQTemplate = new RocketMQTemplate();
           if (applicationContext.containsBean(PRODUCER_BEAN_NAME)) {
               rocketMQTemplate.setProducer((DefaultMQProducer) 
applicationContext.getBean(PRODUCER_BEAN_NAME));
           }
           if (applicationContext.containsBean(CONSUMER_BEAN_NAME)) {
               rocketMQTemplate.setConsumer((DefaultLitePullConsumer) 
applicationContext.getBean(CONSUMER_BEAN_NAME));
           }
           
rocketMQTemplate.setMessageConverter(rocketMQMessageConverter.getMessageConverter());
           return rocketMQTemplate;
       }
   
   **测试代码**
   
[spring-cloud-test.zip](https://github.com/user-attachments/files/19644213/spring-cloud-test.zip)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to