Sfoglia il codice sorgente

架构调整添加rabbitMq

chenjun 1 anno fa
parent
commit
19b16cf29b

+ 1 - 0
zjugis-framework/pom.xml

@@ -43,6 +43,7 @@
         <module>zjugis-spring-boot-starter-flowable</module>
         <module>zjugis-spring-boot-starter-captcha</module>
         <module>zjugis-spring-boot-starter-desensitize</module>
+        <module>zjugis-spring-boot-starter-workflow</module>
     </modules>
 
     <artifactId>zjugis-framework</artifactId>

+ 37 - 5
zjugis-module-adm/zjugis-module-adm-biz/src/main/resources/application-dev.yaml

@@ -70,13 +70,45 @@ spring:
 
 --- #################### MQ 消息队列相关配置 ####################
 spring:
+  rabbitmq:
+    host: 10.10.10.7
+    port: 5672
+    username: zjww
+    password: zjww1402!
+    virtual-host: platform3
+    publisher-confirm-type: correlated #消息确认回调
+    publisher-returns: true #消息返回回调
+    listener:
+      simple:
+        acknowledge-mode: manual #手动确认
+        concurrency: 20          #每个消费者可并行处理的数量
+        max-concurrency: 100
   cloud:
     stream:
-      rocketmq:
-        # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
-        binder:
-          name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址
-      binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时
+      #      rocketmq:
+      #        # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
+      #        binder:
+      #          name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址
+      #          enabled: false
+      #      binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时
+      binders:
+        rabbitmq:
+          type: rabbit
+          environment:
+            spring:
+              rabbitmq:
+                host: 10.10.10.7
+                port: 5672
+                username: zjww
+                password: zjww1402!
+                virtual-host: platform3
+                publisher-confirms: true #消息确认回调
+                publisher-returns: true #消息返回回调
+                listener:
+                  simple:
+                    acknowledge-mode: manual #手动确认
+                    concurrency: 20          #每个消费者可并行处理的数量
+                    max-concurrency: 100
 
 --- #################### 定时任务相关配置 ####################
 

+ 0 - 1
zjugis-module-infra/zjugis-module-infra-biz/src/main/java/com/zjugis/module/infra/InfraServerApplication.java

@@ -14,7 +14,6 @@ import org.springframework.cloud.context.config.annotation.RefreshScope;
  * @author 芋道源码
  */
 @SpringBootApplication
-@RefreshScope
 public class InfraServerApplication {
 
     public static void main(String[] args) {

+ 3 - 0
zjugis-module-infra/zjugis-module-infra-biz/src/main/java/com/zjugis/module/infra/dal/dataobject/file/FileDO.java

@@ -1,5 +1,6 @@
 package com.zjugis.module.infra.dal.dataobject.file;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.zjugis.framework.mybatis.core.dataobject.BaseDO;
 import com.baomidou.mybatisplus.annotation.KeySequence;
 import com.baomidou.mybatisplus.annotation.TableName;
@@ -46,10 +47,12 @@ public class FileDO extends BaseDO {
     /**
      * 文件的 MIME 类型,例如 "application/octet-stream"
      */
+    @TableField("\"TYPE\"")
     private String type;
     /**
      * 文件大小
      */
+    @TableField("\"SIZE\"")
     private Integer size;
 
 }

+ 37 - 5
zjugis-module-infra/zjugis-module-infra-biz/src/main/resources/application-dev.yaml

@@ -75,13 +75,45 @@ spring:
 
 --- #################### MQ 消息队列相关配置 ####################
 spring:
+  rabbitmq:
+    host: 10.10.10.7
+    port: 5672
+    username: zjww
+    password: zjww1402!
+    virtual-host: platform3
+    publisher-confirm-type: correlated #消息确认回调
+    publisher-returns: true #消息返回回调
+    listener:
+      simple:
+        acknowledge-mode: manual #手动确认
+        concurrency: 20          #每个消费者可并行处理的数量
+        max-concurrency: 100
   cloud:
     stream:
-      rocketmq:
-        # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
-        binder:
-          name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址
-      binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时
+      #      rocketmq:
+      #        # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
+      #        binder:
+      #          name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址
+      #          enabled: false
+      #      binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时
+      binders:
+        rabbitmq:
+          type: rabbit
+          environment:
+            spring:
+              rabbitmq:
+                host: 10.10.10.7
+                port: 5672
+                username: zjww
+                password: zjww1402!
+                virtual-host: platform3
+                publisher-confirms: true #消息确认回调
+                publisher-returns: true #消息返回回调
+                listener:
+                  simple:
+                    acknowledge-mode: manual #手动确认
+                    concurrency: 20          #每个消费者可并行处理的数量
+                    max-concurrency: 100
 
 --- #################### 定时任务相关配置 ####################
 xxl:

+ 37 - 5
zjugis-module-system/zjugis-module-system-biz/src/main/resources/application-dev.yaml

@@ -71,13 +71,45 @@ spring:
 
 --- #################### MQ 消息队列相关配置 ####################
 spring:
+  rabbitmq:
+    host: 10.10.10.7
+    port: 5672
+    username: zjww
+    password: zjww1402!
+    virtual-host: platform3
+    publisher-confirm-type: correlated #消息确认回调
+    publisher-returns: true #消息返回回调
+    listener:
+      simple:
+        acknowledge-mode: manual #手动确认
+        concurrency: 20          #每个消费者可并行处理的数量
+        max-concurrency: 100
   cloud:
     stream:
-      rocketmq:
-        # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
-        binder:
-          name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址
-      binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时
+      #      rocketmq:
+      #        # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
+      #        binder:
+      #          name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址
+      #          enabled: false
+      #      binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时
+      binders:
+        rabbitmq:
+          type: rabbit
+          environment:
+            spring:
+              rabbitmq:
+                host: 10.10.10.7
+                port: 5672
+                username: zjww
+                password: zjww1402!
+                virtual-host: platform3
+                publisher-confirms: true #消息确认回调
+                publisher-returns: true #消息返回回调
+                listener:
+                  simple:
+                    acknowledge-mode: manual #手动确认
+                    concurrency: 20          #每个消费者可并行处理的数量
+                    max-concurrency: 100
 
 --- #################### 定时任务相关配置 ####################