Ver Fonte

修改参数

xueyiming há 9 meses atrás
pai
commit
bca7ff2f6c

+ 2 - 2
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/config/MqConfig.java

@@ -6,6 +6,7 @@ import com.aliyun.openservices.ons.api.bean.ConsumerBean;
 import com.aliyun.openservices.ons.api.bean.ProducerBean;
 import com.aliyun.openservices.ons.api.bean.Subscription;
 import com.tzld.longarticle.recommend.server.mq.MessageCallbackCustomer;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -32,7 +33,7 @@ public class MqConfig {
     @Value("${pushMessage.callback.groupId}")
     private String callbackGroupId;
 
-    @Resource
+    @Autowired
     private MessageCallbackCustomer messageCallbackCustomer;
 
     public Properties getMqProperties() {
@@ -52,7 +53,6 @@ public class MqConfig {
 
 
     @Bean(initMethod = "start", destroyMethod = "shutdown")
-    @DependsOn("messageCallbackCustomer")
     public ConsumerBean buildConsumer() {
         ConsumerBean consumerBean = new ConsumerBean();
         //配置文件