1
0
Переглянути джерело

修改依赖版本和生产一致

lvjian 5 місяців тому
батько
коміт
e864e14e70

+ 1 - 1
build.gradle

@@ -1,5 +1,5 @@
 plugins {
-    id 'org.springframework.boot' version '2.7.2'
+    id 'org.springframework.boot' version '2.0.2.RELEASE'
 }
 
 apply plugin: 'java'

+ 4 - 9
src/main/java/com/emato/ccnet/wx/rabbitMq/rabbitImpl/Ceb311OrderListenerImpl.java

@@ -7,10 +7,8 @@ import com.google.gson.Gson;
 import com.rabbitmq.client.Channel;
 import org.springframework.amqp.core.AcknowledgeMode;
 import org.springframework.amqp.core.Message;
-import org.springframework.amqp.core.Queue;
-import org.springframework.amqp.rabbit.connection.ConnectionFactory;
+import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
 import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
-import org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.stereotype.Component;
@@ -23,18 +21,15 @@ public class Ceb311OrderListenerImpl extends RabbitMqConfig {
     @Autowired
     private Ceb311CustiomsResponse ceb311CustiomsResponse;
 
-    @Autowired
-    private Queue ccnetGainDeclareCspQueue;
-
     /**
      * 队列消息监听
      *
      * @return
      */
     @Bean
-    public SimpleMessageListenerContainer goodsCEB201MessageContainer(ConnectionFactory connectionFactory) {
-        SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(connectionFactory);
-        container.setQueues(ccnetGainDeclareCspQueue);
+    public SimpleMessageListenerContainer goodsCEB201MessageContainer() {
+        SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(connectionFactory());
+        container.setQueues(super.ccnetGainDeclareCspQueue());
         container.setExposeListenerChannel(true);
         container.setMaxConcurrentConsumers(1);
         container.setConcurrentConsumers(1);