Przeglądaj źródła

【修改】mq初步提交

zhuzhoutong 4 lat temu
rodzic
commit
476f31c98b

+ 1 - 2
framework-starter/mrxu-starter-rocketmq/src/main/java/com/mrxu/framework/starter/rocketmq/RocketMQSender.java

@@ -13,7 +13,6 @@ import org.springframework.stereotype.Service;
  * @author 上研院 zhuzhoutong
  * @date 2021/11/17
  */
-@Service
 public class RocketMQSender {
 
     /**
@@ -34,7 +33,7 @@ public class RocketMQSender {
      * @param message 发送内容
      */
     public void sendMsg(String destination, Object message){
-        this.sendMsg(destination,message);
+        this.sendMsg(destination,message,messageTimeOut);
     }
 
     /**

+ 20 - 0
framework-starter/mrxu-starter-rocketmq/src/main/java/com/mrxu/framework/starter/rocketmq/config/RocketmqAutoConfig.java

@@ -0,0 +1,20 @@
+package com.mrxu.framework.starter.rocketmq.config;
+
+import com.mrxu.framework.starter.rocketmq.RocketMQSender;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 功能概要:[] <br>
+ *
+ * @author 上研院 zhuzhoutong
+ * @date 2021/11/19
+ */
+@Configuration
+public class RocketmqAutoConfig {
+
+    @Bean
+    public RocketMQSender rocketMQSender(){
+        return new RocketMQSender();
+    }
+}

+ 2 - 0
framework-starter/mrxu-starter-rocketmq/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,2 @@
+# 指定开启自动配置类
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.mrxu.framework.starter.rocketmq.config.RocketmqAutoConfig

+ 1 - 0
framework-starter/pom.xml

@@ -20,5 +20,6 @@
     <modules>
         <module>mrxu-starter-redisson</module>
         <module>mrxu-starter-rocketmq</module>
+        <module>mrxu-starter-xxljob</module>
     </modules>
 </project>