wujianwei
2025-12-22 babfb0032090ec99403ed1410b42aa17b78486c3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package com.ruoyi.framework.config;
 
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
@Configuration
public class RabbitMqConfig {
    @Bean
    public RabbitTemplate rabbitTemplate( ConnectionFactory connectionFactory){
        return new RabbitTemplate(connectionFactory);
    }
 
}