wujianwei
2025-12-23 880fc56d1342d873a8ed17de3a61afcb194c365e
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);
    }
 
}