12345678910111213141516171819202122232425262728293031 |
- package com.citygis.web.service.impl;
- import com.citygis.common.annotation.PushToKafka;
- import com.citygis.web.domain.KafkaPushTest;
- import com.citygis.web.service.NotiKafkaService;
- import org.springframework.stereotype.Service;
- /**
- * @Name NotiKafkaServiceImpl
- * @Version 1.0
- * @Date 2025-02-21 15:16:33
- * @Author harri
- * @Description: Kafka Push Test
- */
- @Service
- public class NotiKafkaServiceImpl implements NotiKafkaService {
- // todo: 改为数据库查询结果
- @Override
- @PushToKafka
- public KafkaPushTest sendNotification(int monitorId) {
- KafkaPushTest kafkaPushTest = new KafkaPushTest();
- kafkaPushTest.setQuerySql("dasd");
- kafkaPushTest.setResCode(12);
- kafkaPushTest.setBootstrapAddress("127.0.0.1");
- kafkaPushTest.setPort("8080");
- kafkaPushTest.setKey("asd");
- kafkaPushTest.setValue("sssdadadasdasd");
- return kafkaPushTest;
- }
- }
|