修复pay-service中rocketMq实例无法注入
This commit is contained in:
@@ -85,7 +85,6 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.rocketmq</groupId>
|
||||
<artifactId>rocketmq-client</artifactId>
|
||||
<version>5.3.2</version> <!-- 这个存在于 Central -->
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# RocketMQ 2.2.3 version does not adapt to SpringBoot3
|
||||
org.apache.rocketmq.spring.autoconfigure.RocketMQAutoConfiguration
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user