diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java index cc9ee2a2..dcfda4f7 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java @@ -77,24 +77,24 @@ public class JeecgSystemApplication extends SpringBootServletInitializer { } -// @Autowired -// private Environment environment; -// -// //创建队列 -// @Bean -// public Queue queue() { -// return new Queue(environment.getProperty("mq.pay.queue.order")); -// } -// -// //创建交换机 -// @Bean -// public DirectExchange directExchange() { -// return new DirectExchange(environment.getProperty("mq.pay.exchange.order")); -// } -// -// //将队列与交换机进行绑定 -// @Bean -// public Binding binding() { -// return BindingBuilder.bind(queue()).to(directExchange()).with(environment.getProperty("mq.pay.routing.order")); -// } + @Autowired + private Environment environment; + + //创建队列 + @Bean + public Queue queue() { + return new Queue(environment.getProperty("mq.pay.queue.order")); + } + + //创建交换机 + @Bean + public DirectExchange directExchange() { + return new DirectExchange(environment.getProperty("mq.pay.exchange.order")); + } + + //将队列与交换机进行绑定 + @Bean + public Binding binding() { + return BindingBuilder.bind(queue()).to(directExchange()).with(environment.getProperty("mq.pay.routing.order")); + } }