feat(examples): 移除设备和问卷集成示例代码

- 删除默认配置集成服务使用示例类- 移除设备配置筛选功能使用示例
- 清理设备集成基础操作示例代码
- 移除设备集成降级机制示例
- 删除Kafka集成使用示例
- 清理问卷集成服务示例代码
This commit is contained in:
2025-10-11 00:09:33 +08:00
parent e8c645a3c0
commit 99857db006
7 changed files with 0 additions and 1301 deletions

View File

@@ -1,57 +0,0 @@
package com.ycwl.basic.integration.kafka.example;
import com.ycwl.basic.integration.kafka.dto.KafkaMessage;
import com.ycwl.basic.integration.kafka.service.KafkaIntegrationService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
/**
* Kafka集成使用示例(暂时注释,后续开发时启用)
*/
@Slf4j
@Component
@RequiredArgsConstructor
@ConditionalOnProperty(name = "kafka.example.enabled", havingValue = "true", matchIfMissing = false)
public class KafkaIntegrationExample {
private final KafkaIntegrationService kafkaService;
/**
* 演示Kafka连接测试
*/
public void demonstrateConnectionTest() {
log.info("=== Kafka Integration Example ===");
// 测试连接
boolean connected = kafkaService.testConnection();
log.info("Kafka connection status: {}", connected ? "SUCCESS" : "FAILED");
// 显示配置信息
var properties = kafkaService.getKafkaProperties();
log.info("Kafka Bootstrap Servers: {}", properties.getBootstrapServers());
log.info("Consumer Group ID: {}", properties.getConsumer().getGroupId());
}
/**
* 演示消息发送(预留示例)
*/
public void demonstrateMessageSending() {
log.info("=== Message Sending Example (Not Implemented) ===");
// 创建示例消息
KafkaMessage<String> message = KafkaMessage.of(
"test-topic",
"TEST_EVENT",
"Hello Kafka from liuying-microservice!"
);
// 发送消息(暂不实现)
kafkaService.sendMessage("test-topic", "test-key", message);
log.info("Message sending demonstration completed");
}
// TODO: 后续添加消费者示例
// public void demonstrateMessageConsuming() { ... }
}