123456789101112131415161718192021222324252627282930313233343536 |
- package cn.gygxzc.envir;
- import cn.gygxzc.tina.cloud.bus.constant.QueueName;
- import org.springframework.amqp.core.Queue;
- import org.springframework.context.annotation.Bean;
- import org.springframework.context.annotation.ComponentScan;
- import org.springframework.context.annotation.Configuration;
- /**
- * Created by niantuo on 2018/9/29.
- * rabbit配置.
- * 暂时对这个不了解,暂时使用自动配置结果
- * 注意分包方式。
- * 只要导入该包,即可自动配置,无需再用注解。
- */
- @Configuration
- @ComponentScan
- public class RabbitConfiguration {
- /***
- * 这个如果需要使用,改成自己项目的名称
- * @return 消息队列
- */
- @Bean
- public Queue frameworkQueue() {
- return new Queue(QueueName.Framework);
- }
- // @Bean
- // public Queue logQueue(){
- // return new Queue(QueueName.LOG);
- // }
- }
|