From eaf26721acdc39923aa265790a8b143cdad445aa Mon Sep 17 00:00:00 2001 From: huangyw <1207046171@qq.com> Date: Thu, 1 Aug 2024 20:59:21 +0800 Subject: [PATCH] =?UTF-8?q?release:=20=E6=89=93=E5=8C=85=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?mq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/luoo/music/config/RabbitMQConfig.java | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/luoo_music/src/main/java/com/luoo/music/config/RabbitMQConfig.java b/luoo_music/src/main/java/com/luoo/music/config/RabbitMQConfig.java index 3da8250..61d904d 100644 --- a/luoo_music/src/main/java/com/luoo/music/config/RabbitMQConfig.java +++ b/luoo_music/src/main/java/com/luoo/music/config/RabbitMQConfig.java @@ -1,35 +1,35 @@ -package com.luoo.music.config; - -import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory; -import org.springframework.amqp.rabbit.connection.ConnectionFactory; -import org.springframework.amqp.rabbit.core.RabbitTemplate; -import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * @Author: yawei.huang - * @Package: com.macro.mall.config - * @Project: macrozhengmall - * @Date: 2024/5/8 14:13 - * @Filename: RabbitMQConfig - * @Describe: - */ -@Configuration -public class RabbitMQConfig { - - @Bean - public RabbitTemplate rabbitTemplate(ConnectionFactory connectionFactory) { - RabbitTemplate template = new RabbitTemplate(connectionFactory); - template.setMessageConverter(new Jackson2JsonMessageConverter()); - return template; - } - - @Bean - public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory(ConnectionFactory connectionFactory) { - SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); - factory.setConnectionFactory(connectionFactory); - factory.setMessageConverter(new Jackson2JsonMessageConverter()); - return factory; - } -} +//package com.luoo.music.config; +// +//import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory; +//import org.springframework.amqp.rabbit.connection.ConnectionFactory; +//import org.springframework.amqp.rabbit.core.RabbitTemplate; +//import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +// +///** +// * @Author: yawei.huang +// * @Package: com.macro.mall.config +// * @Project: macrozhengmall +// * @Date: 2024/5/8 14:13 +// * @Filename: RabbitMQConfig +// * @Describe: +// */ +//@Configuration +//public class RabbitMQConfig { +// +// @Bean +// public RabbitTemplate rabbitTemplate(ConnectionFactory connectionFactory) { +// RabbitTemplate template = new RabbitTemplate(connectionFactory); +// template.setMessageConverter(new Jackson2JsonMessageConverter()); +// return template; +// } +// +// @Bean +// public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory(ConnectionFactory connectionFactory) { +// SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); +// factory.setConnectionFactory(connectionFactory); +// factory.setMessageConverter(new Jackson2JsonMessageConverter()); +// return factory; +// } +//}