From 2fde735f6b67b7eae835f645ad66f90dc3a89a5f Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Sat, 13 May 2023 17:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92-=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96=205.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/JeecgSystemApplication.java | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) 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")); + } }