diff --git a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/mq/TenantChannelInterceptor.java b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/mq/TenantChannelInterceptor.java deleted file mode 100644 index 4eb471f52..000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/mq/TenantChannelInterceptor.java +++ /dev/null @@ -1,32 +0,0 @@ -package cn.iocoder.yudao.framework.tenant.core.mq; - -import cn.hutool.core.util.ReflectUtil; -import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; -import org.springframework.messaging.Message; -import org.springframework.messaging.MessageChannel; -import org.springframework.messaging.support.ChannelInterceptor; - -import java.util.Map; - -import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID; - -/** - * 多租户的 {@link ChannelInterceptor} 实现类 - * 发送消息时,设置租户编号到 Header 上 - * - * @author 芋道源码 - */ -public class TenantChannelInterceptor implements ChannelInterceptor { - - @Override - @SuppressWarnings({"unchecked", "NullableProblems"}) - public Message preSend(Message message, MessageChannel channel) { - Long tenantId = TenantContextHolder.getTenantId(); - if (tenantId != null) { - Map headers = (Map) ReflectUtil.getFieldValue(message.getHeaders(), "headers"); - headers.put(HEADER_TENANT_ID, tenantId); - } - return message; - } - -} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/mq/TenantFunctionAroundWrapper.java b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/mq/TenantFunctionAroundWrapper.java deleted file mode 100644 index e1db0be9b..000000000 --- a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/mq/TenantFunctionAroundWrapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.framework.tenant.core.mq; - -import cn.hutool.core.map.MapUtil; -import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; -import org.springframework.cloud.function.context.catalog.FunctionAroundWrapper; -import org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry; -import org.springframework.messaging.Message; - -import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID; - -/** - * 多租户 FunctionAroundWrapper 实现类 - * 消费消息时,设置租户编号到 Context 上 - * - * @author 芋道源码 - */ -public class TenantFunctionAroundWrapper extends FunctionAroundWrapper { - - @Override - protected Object doApply(Object input, SimpleFunctionRegistry.FunctionInvocationWrapper targetFunction) { - // 如果不是 MQ 消息,则直接跳过 - if (!(input instanceof Message)) { - return targetFunction.apply(input); - } - // 如果没有多租户,则直接跳过 - Message message = (Message) input; - Long tenantId = MapUtil.getLong(message.getHeaders(), HEADER_TENANT_ID); - if (tenantId == null) { - return targetFunction.apply(input); - } - - // 如果有多租户,则使用多租户上下文 - return TenantUtils.execute(tenantId, () -> targetFunction.apply(input)); - } - -} diff --git a/yudao-framework/yudao-spring-boot-starter-mq/pom.xml b/yudao-framework/yudao-spring-boot-starter-mq/pom.xml index 5a6b4b1ec..3a46ca9ab 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-mq/pom.xml @@ -21,17 +21,6 @@ - - com.alibaba.cloud - - spring-cloud-starter-stream-rocketmq - - - - com.alibaba.cloud - - spring-cloud-starter-bus-rocketmq - diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java index 32ff82c8c..8a85af17d 100644 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java @@ -1,15 +1,6 @@ package cn.iocoder.yudao.framework.mq.config; -import com.alibaba.cloud.stream.binder.rocketmq.convert.RocketMQMessageConverter; import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.messaging.converter.*; - -import java.util.ArrayList; -import java.util.List; /** * 消息队列配置类 @@ -19,19 +10,4 @@ import java.util.List; @AutoConfiguration public class YudaoMQAutoConfiguration { - /** - * 覆盖 {@link RocketMQMessageConverter} 的配置,去掉 fastjson 的转换器,解决不兼容的问题 - */ - @Bean(RocketMQMessageConverter.DEFAULT_NAME) - @ConditionalOnMissingBean(name = { RocketMQMessageConverter.DEFAULT_NAME }) - public CompositeMessageConverter rocketMQMessageConverter() { - List messageConverters = new ArrayList<>(); - ByteArrayMessageConverter byteArrayMessageConverter = new ByteArrayMessageConverter(); - byteArrayMessageConverter.setContentTypeResolver(null); - messageConverters.add(byteArrayMessageConverter); - messageConverters.add(new StringMessageConverter()); - messageConverters.add(new MappingJackson2MessageConverter()); - return new CompositeMessageConverter(messageConverters); - } - } diff --git a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/core/bus/AbstractBusProducer.java b/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/core/bus/AbstractBusProducer.java deleted file mode 100644 index 9c85299fa..000000000 --- a/yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/core/bus/AbstractBusProducer.java +++ /dev/null @@ -1,41 +0,0 @@ -package cn.iocoder.yudao.framework.mq.core.bus; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.bus.ServiceMatcher; -import org.springframework.cloud.bus.event.RemoteApplicationEvent; -import org.springframework.context.ApplicationEventPublisher; - -import javax.annotation.Resource; - -/** - * 基于 Spring Cloud Bus 实现的 Producer 抽象类 - * - * @author 芋道源码 - */ -public abstract class AbstractBusProducer { - - @Resource - protected ApplicationEventPublisher applicationEventPublisher; - - @Resource - protected ServiceMatcher serviceMatcher; - - @Value("${spring.application.name}") - protected String applicationName; - - protected void publishEvent(RemoteApplicationEvent event) { - applicationEventPublisher.publishEvent(event); - } - - /** - * @return 只广播给自己服务的实例 - */ - protected String selfDestinationService() { - return applicationName + ":**"; - } - - protected String getBusId() { - return serviceMatcher.getBusId(); - } - -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-dev.yaml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-dev.yaml index e889708d4..13e35b51c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-dev.yaml @@ -59,13 +59,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-local.yaml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-local.yaml index f9c2673b5..6b22d9a50 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-local.yaml +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application-local.yaml @@ -70,14 +70,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时 --- #################### 定时任务相关配置 #################### diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application.yaml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application.yaml index b72d9de77..2908b5ce3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application.yaml +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application.yaml @@ -85,26 +85,6 @@ spring: --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - # Spring Cloud Stream 配置项,对应 BindingServiceProperties 类 - stream: - # Spring Cloud Stream RocketMQ 配置项 - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - default: # 默认 bindings 全局配置 - producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类 - group: bpm_producer_group # 生产者分组 - send-type: SYNC # 发送模式,SYNC 同步 - - # Spring Cloud Bus 配置项,对应 BusProperties 类 - bus: - enabled: true # 是否开启,默认为 true - id: ${spring.application.name}:${server.port} # 编号,Spring Cloud Alibaba 建议使用“应用:端口”的格式 - destination: springCloudBus # 目标消息队列,默认为 springCloudBus - --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-infra/yudao-module-infra-biz/pom.xml b/yudao-module-infra/yudao-module-infra-biz/pom.xml index 99cd709f6..5df268b29 100644 --- a/yudao-module-infra/yudao-module-infra-biz/pom.xml +++ b/yudao-module-infra/yudao-module-infra-biz/pom.xml @@ -101,10 +101,6 @@ - - cn.iocoder.cloud - yudao-spring-boot-starter-mq - diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml index df0135e11..357acc316 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml @@ -59,13 +59,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-local.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-local.yaml index 72f6d1a9d..896a7b3d2 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-local.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-local.yaml @@ -74,14 +74,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时 --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml index 17f8502eb..b6aa6fe2e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml @@ -74,34 +74,6 @@ spring: --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - # Spring Cloud Stream 配置项,对应 BindingServiceProperties 类 - stream: - function: - definition: busConsumer - # Binding 配置项,对应 BindingProperties Map -# bindings: - # Spring Cloud Stream RocketMQ 配置项 - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - default: # 默认 bindings 全局配置 - producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类 - group: infra_producer_group # 生产者分组 - send-type: SYNC # 发送模式,SYNC 同步 - bindings: - springCloudBusInput: - consumer: - message-model: BROADCASTING # 重要,解决 Spring Cloud Bus RocketMQ 默认不是 BROADCASTING 广播消费的问题 - - # Spring Cloud Bus 配置项,对应 BusProperties 类 - bus: - enabled: true # 是否开启,默认为 true - id: ${spring.application.name}:${server.port} # 编号,Spring Cloud Alibaba 建议使用“应用:端口”的格式 - destination: springCloudBus # 目标消息队列,默认为 springCloudBus - --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/resources/application-dev.yaml b/yudao-module-mall/yudao-module-product-biz/src/main/resources/application-dev.yaml index d8a81c9a3..da8ae23ce 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-mall/yudao-module-product-biz/src/main/resources/application-dev.yaml @@ -59,13 +59,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/resources/application-local.yaml b/yudao-module-mall/yudao-module-product-biz/src/main/resources/application-local.yaml index 1a2e58dbf..d935b65d8 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/resources/application-local.yaml +++ b/yudao-module-mall/yudao-module-product-biz/src/main/resources/application-local.yaml @@ -70,14 +70,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时 --- #################### 定时任务相关配置 #################### diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/resources/application.yaml b/yudao-module-mall/yudao-module-product-biz/src/main/resources/application.yaml index 5ed19cb6f..f0c0acfd2 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/resources/application.yaml +++ b/yudao-module-mall/yudao-module-product-biz/src/main/resources/application.yaml @@ -74,33 +74,6 @@ spring: --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - # Spring Cloud Stream 配置项,对应 BindingServiceProperties 类 - stream: - function: - definition: busConsumer; - # Binding 配置项,对应 BindingProperties Map - # Spring Cloud Stream RocketMQ 配置项 - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - default: # 默认 bindings 全局配置 - producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类 - group: product_producer_group # 生产者分组 - send-type: SYNC # 发送模式,SYNC 同步 - bindings: - springCloudBusInput: - consumer: - message-model: BROADCASTING # 重要,解决 Spring Cloud Bus RocketMQ 默认不是 BROADCASTING 广播消费的问题 - - # Spring Cloud Bus 配置项,对应 BusProperties 类 - bus: - enabled: true # 是否开启,默认为 true - id: ${spring.application.name}:${server.port} # 编号,Spring Cloud Alibaba 建议使用“应用:端口”的格式 - destination: springCloudBus # 目标消息队列,默认为 springCloudBus - --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application-dev.yaml b/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application-dev.yaml index d8a81c9a3..da8ae23ce 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application-dev.yaml @@ -59,13 +59,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application-local.yaml b/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application-local.yaml index 1a2e58dbf..d935b65d8 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application-local.yaml +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application-local.yaml @@ -70,14 +70,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时 --- #################### 定时任务相关配置 #################### diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application.yaml b/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application.yaml index e9c2474bf..604a83cdf 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application.yaml +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/resources/application.yaml @@ -74,33 +74,6 @@ spring: --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - # Spring Cloud Stream 配置项,对应 BindingServiceProperties 类 - stream: - function: - definition: busConsumer; - # Binding 配置项,对应 BindingProperties Map - # Spring Cloud Stream RocketMQ 配置项 - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - default: # 默认 bindings 全局配置 - producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类 - group: promotion_producer_group # 生产者分组 - send-type: SYNC # 发送模式,SYNC 同步 - bindings: - springCloudBusInput: - consumer: - message-model: BROADCASTING # 重要,解决 Spring Cloud Bus RocketMQ 默认不是 BROADCASTING 广播消费的问题 - - # Spring Cloud Bus 配置项,对应 BusProperties 类 - bus: - enabled: true # 是否开启,默认为 true - id: ${spring.application.name}:${server.port} # 编号,Spring Cloud Alibaba 建议使用“应用:端口”的格式 - destination: springCloudBus # 目标消息队列,默认为 springCloudBus - --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application-dev.yaml b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application-dev.yaml index d8a81c9a3..da8ae23ce 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application-dev.yaml @@ -59,13 +59,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application-local.yaml b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application-local.yaml index 1a2e58dbf..d935b65d8 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application-local.yaml +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application-local.yaml @@ -70,14 +70,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时 --- #################### 定时任务相关配置 #################### diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application.yaml b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application.yaml index d72091fc1..1a1b3f887 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application.yaml +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/application.yaml @@ -74,33 +74,6 @@ spring: --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - # Spring Cloud Stream 配置项,对应 BindingServiceProperties 类 - stream: - function: - definition: busConsumer; - # Binding 配置项,对应 BindingProperties Map - # Spring Cloud Stream RocketMQ 配置项 - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - default: # 默认 bindings 全局配置 - producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类 - group: statistics_producer_group # 生产者分组 - send-type: SYNC # 发送模式,SYNC 同步 - bindings: - springCloudBusInput: - consumer: - message-model: BROADCASTING # 重要,解决 Spring Cloud Bus RocketMQ 默认不是 BROADCASTING 广播消费的问题 - - # Spring Cloud Bus 配置项,对应 BusProperties 类 - bus: - enabled: true # 是否开启,默认为 true - id: ${spring.application.name}:${server.port} # 编号,Spring Cloud Alibaba 建议使用“应用:端口”的格式 - destination: springCloudBus # 目标消息队列,默认为 springCloudBus - --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application-dev.yaml b/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application-dev.yaml index 9bedff0a1..5e1c117e0 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application-dev.yaml @@ -59,13 +59,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application-local.yaml b/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application-local.yaml index f0a796a83..4dde16117 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application-local.yaml +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application-local.yaml @@ -70,14 +70,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时 --- #################### 定时任务相关配置 #################### diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application.yaml b/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application.yaml index 493ded33e..780224837 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application.yaml +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/resources/application.yaml @@ -74,33 +74,6 @@ spring: --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - # Spring Cloud Stream 配置项,对应 BindingServiceProperties 类 - stream: - function: - definition: busConsumer; - # Binding 配置项,对应 BindingProperties Map - # Spring Cloud Stream RocketMQ 配置项 - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - default: # 默认 bindings 全局配置 - producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类 - group: trade_producer_group # 生产者分组 - send-type: SYNC # 发送模式,SYNC 同步 - bindings: - springCloudBusInput: - consumer: - message-model: BROADCASTING # 重要,解决 Spring Cloud Bus RocketMQ 默认不是 BROADCASTING 广播消费的问题 - - # Spring Cloud Bus 配置项,对应 BusProperties 类 - bus: - enabled: true # 是否开启,默认为 true - id: ${spring.application.name}:${server.port} # 编号,Spring Cloud Alibaba 建议使用“应用:端口”的格式 - destination: springCloudBus # 目标消息队列,默认为 springCloudBus - --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-member/yudao-module-member-biz/src/main/resources/application-dev.yaml b/yudao-module-member/yudao-module-member-biz/src/main/resources/application-dev.yaml index d8a81c9a3..da8ae23ce 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-member/yudao-module-member-biz/src/main/resources/application-dev.yaml @@ -59,13 +59,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-member/yudao-module-member-biz/src/main/resources/application-local.yaml b/yudao-module-member/yudao-module-member-biz/src/main/resources/application-local.yaml index 1a2e58dbf..d935b65d8 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/resources/application-local.yaml +++ b/yudao-module-member/yudao-module-member-biz/src/main/resources/application-local.yaml @@ -70,14 +70,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时 --- #################### 定时任务相关配置 #################### diff --git a/yudao-module-member/yudao-module-member-biz/src/main/resources/application.yaml b/yudao-module-member/yudao-module-member-biz/src/main/resources/application.yaml index 81ebdd615..d73214ed8 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/resources/application.yaml +++ b/yudao-module-member/yudao-module-member-biz/src/main/resources/application.yaml @@ -74,33 +74,6 @@ spring: --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - # Spring Cloud Stream 配置项,对应 BindingServiceProperties 类 - stream: - function: - definition: busConsumer; - # Binding 配置项,对应 BindingProperties Map - # Spring Cloud Stream RocketMQ 配置项 - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - default: # 默认 bindings 全局配置 - producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类 - group: member_producer_group # 生产者分组 - send-type: SYNC # 发送模式,SYNC 同步 - bindings: - springCloudBusInput: - consumer: - message-model: BROADCASTING # 重要,解决 Spring Cloud Bus RocketMQ 默认不是 BROADCASTING 广播消费的问题 - - # Spring Cloud Bus 配置项,对应 BusProperties 类 - bus: - enabled: true # 是否开启,默认为 true - id: ${spring.application.name}:${server.port} # 编号,Spring Cloud Alibaba 建议使用“应用:端口”的格式 - destination: springCloudBus # 目标消息队列,默认为 springCloudBus - --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-report/yudao-module-report-biz/pom.xml b/yudao-module-report/yudao-module-report-biz/pom.xml index eacc0053b..72562cb99 100644 --- a/yudao-module-report/yudao-module-report-biz/pom.xml +++ b/yudao-module-report/yudao-module-report-biz/pom.xml @@ -96,16 +96,8 @@ - - - - - - - - diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml index 87dd77e9e..f68290352 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-dev.yaml @@ -59,13 +59,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 --- #################### 定时任务相关配置 #################### xxl: diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml index e774b17cb..23b11c625 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml @@ -70,14 +70,6 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - stream: - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时 --- #################### 定时任务相关配置 #################### diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml index e13fea1c6..7a3f111cf 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml @@ -74,44 +74,6 @@ spring: --- #################### MQ 消息队列相关配置 #################### -spring: - cloud: - # Spring Cloud Stream 配置项,对应 BindingServiceProperties 类 - stream: - function: - definition: busConsumer;smsSendConsumer;mailSendConsumer - # Binding 配置项,对应 BindingProperties Map - bindings: - smsSend-out-0: - destination: system_sms_send - smsSendConsumer-in-0: - destination: system_sms_send - group: system_sms_send_consumer_group - mailSend-out-0: - destination: system_mail_send - mailSendConsumer-in-0: - destination: system_mail_send - group: system_mail_send_consumer_group - # Spring Cloud Stream RocketMQ 配置项 - rocketmq: - # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 - binder: - name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 - default: # 默认 bindings 全局配置 - producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类 - group: system_producer_group # 生产者分组 - send-type: SYNC # 发送模式,SYNC 同步 - bindings: - springCloudBusInput: - consumer: - message-model: BROADCASTING # 重要,解决 Spring Cloud Bus RocketMQ 默认不是 BROADCASTING 广播消费的问题 - - # Spring Cloud Bus 配置项,对应 BusProperties 类 - bus: - enabled: true # 是否开启,默认为 true - id: ${spring.application.name}:${server.port} # 编号,Spring Cloud Alibaba 建议使用“应用:端口”的格式 - destination: springCloudBus # 目标消息队列,默认为 springCloudBus - --- #################### 定时任务相关配置 #################### xxl: