From 54d45031fc01ddb1044c40d6a14d212683822278 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 31 Jan 2024 12:10:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E7=9B=91=E5=90=AC=E7=9A=84=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/api/listener/DebugListener.java | 4 ++-- .../java/io/metersphere/api/listener/MessageListener.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/listener/DebugListener.java b/backend/services/api-test/src/main/java/io/metersphere/api/listener/DebugListener.java index 5d0ad474b5..bb54fdfaac 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/listener/DebugListener.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/listener/DebugListener.java @@ -7,13 +7,13 @@ import io.metersphere.sdk.util.LogUtils; import io.metersphere.sdk.util.WebSocketUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.kafka.clients.consumer.ConsumerRecord; -import org.springframework.context.annotation.Configuration; import org.springframework.kafka.annotation.KafkaListener; +import org.springframework.stereotype.Component; /** * 后端调试消息监听器 */ -@Configuration +@Component public class DebugListener { public static final String DEBUG_CONSUME_ID = "MS-API-DEBUG-CONSUME"; diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/listener/MessageListener.java b/backend/services/api-test/src/main/java/io/metersphere/api/listener/MessageListener.java index 04790c3480..e2b6981f6b 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/listener/MessageListener.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/listener/MessageListener.java @@ -14,10 +14,10 @@ import jakarta.annotation.Resource; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.kafka.clients.consumer.ConsumerRecord; -import org.springframework.context.annotation.Configuration; import org.springframework.kafka.annotation.KafkaListener; +import org.springframework.stereotype.Component; -@Configuration +@Component public class MessageListener { public static final String MESSAGE_CONSUME_ID = "MS-API-MESSAGE-CONSUME"; @Resource