From d80a42a20dc39bd7653d92fe43dc0b88e81c74e7 Mon Sep 17 00:00:00 2001
From: JACKYMYPERSON <1627832236@qq.com>
Date: Tue, 3 Mar 2026 23:14:22 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dpay-service=E4=B8=ADrocketMq?=
=?UTF-8?q?=E5=AE=9E=E4=BE=8B=E6=97=A0=E6=B3=95=E6=B3=A8=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pay-service/pom.xml | 1 -
.../java/cn/mayiming/Service/PayService.java | 1 +
...oot.autoconfigure.AutoConfiguration.import | 2 ++
.../src/main/resources/application.yml | 2 ++
pom.xml | 27 ++++++++++++++-----
5 files changed, 25 insertions(+), 8 deletions(-)
create mode 100644 pay-service/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.import
diff --git a/pay-service/pom.xml b/pay-service/pom.xml
index 8d796bc..d319cc0 100644
--- a/pay-service/pom.xml
+++ b/pay-service/pom.xml
@@ -85,7 +85,6 @@
org.apache.rocketmq
rocketmq-client
- 5.3.2
diff --git a/pay-service/src/main/java/cn/mayiming/Service/PayService.java b/pay-service/src/main/java/cn/mayiming/Service/PayService.java
index 074b782..a2975af 100644
--- a/pay-service/src/main/java/cn/mayiming/Service/PayService.java
+++ b/pay-service/src/main/java/cn/mayiming/Service/PayService.java
@@ -5,6 +5,7 @@ import cn.mayiming.Entity.PayRecord;
import cn.mayiming.Entity.PayTriggerMsgDTO;
import cn.mayiming.Mapper.payMapper;
import jakarta.annotation.Resource;
+import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
diff --git a/pay-service/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.import b/pay-service/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.import
new file mode 100644
index 0000000..96d8d2e
--- /dev/null
+++ b/pay-service/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.import
@@ -0,0 +1,2 @@
+# RocketMQ 2.2.3 version does not adapt to SpringBoot3
+org.apache.rocketmq.spring.autoconfigure.RocketMQAutoConfiguration
\ No newline at end of file
diff --git a/pay-service/src/main/resources/application.yml b/pay-service/src/main/resources/application.yml
index 9c5ff52..8f9f31f 100644
--- a/pay-service/src/main/resources/application.yml
+++ b/pay-service/src/main/resources/application.yml
@@ -41,6 +41,8 @@ spring:
rocketmq:
# NameServer 地址(替换为你的 RocketMQ 服务器IP)
name-server: 127.0.0.1:9876
+ producer:
+ group: pay-producer-group
consumer:
# 消费者组名(必须唯一,建议按服务+用途命名)
group: pay-service-consumer
diff --git a/pom.xml b/pom.xml
index 562261a..743029a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,6 +18,24 @@
3.2.3
+
+
+ apache-snapshots
+ Apache Snapshots
+ https://repository.apache.org/content/repositories/releases/
+
+ true
+
+
+ false
+
+
+
+
+ central
+ https://repo.maven.apache.org/maven2
+
+
@@ -87,18 +105,13 @@
org.apache.rocketmq
- rocketmq-client-java
+ rocketmq-client
5.3.2
org.apache.rocketmq
rocketmq-spring-boot-starter
- 2.3.2
-
-
- org.apache.rocketmq
- rocketmq-client
- 5.3.2
+ 2.3.4