瀏覽代碼

add missing annotation @Component

till 4 年之前
父節點
當前提交
20fce82112
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/main/java/kafkademo/kafka/listener/SingleListener.java

+ 2 - 0
src/main/java/kafkademo/kafka/listener/SingleListener.java

@@ -1,7 +1,9 @@
 package kafkademo.kafka.listener;
 
 import org.springframework.kafka.annotation.KafkaListener;
+import org.springframework.stereotype.Component;
 
+@Component
 public class SingleListener {
 
     @KafkaListener(topics = "one-exchange", groupId = "group-id")