docs: align readme with runtime stack

This commit is contained in:
lingniu
2026-07-01 06:33:43 +08:00
parent be2daf986a
commit d8f8235544
2 changed files with 31 additions and 5 deletions

View File

@@ -15,12 +15,12 @@
| 类别 | 选型 | | 类别 | 选型 |
|---|---| |---|---|
| 语言 | Java **25** | | 语言 | Java **25** |
| 框架 | Spring Boot 3.4.x | | 框架 | Spring Boot 3.5.3 |
| 网络 | Netty 4.1 | | 网络 | Netty 4.2.9.Final |
| 并发 | Disruptor 4 + 虚拟线程 + `StructuredTaskScope` | | 并发 | Disruptor 4 + 虚拟线程 + `StructuredTaskScope` |
| 消息队列 | **Kafka**vin 分区,保证单车有序) | | 消息队列 | **Kafka**vin 分区,保证单车有序) |
| 线上消息格式 | **Protobuf**,调试走 JSON | | 线上消息格式 | **Protobuf**,调试走 JSON |
| MQTT 客户端 | HiveMQ MQTT Client | | MQTT 客户端 | Eclipse Paho 1.2.5 |
| 会话缓存 | Redis 生产索引 + Caffeine 内存降级 | | 会话缓存 | Redis 生产索引 + Caffeine 内存降级 |
| 熔断/限流 | Resilience4j 2 | | 熔断/限流 | Resilience4j 2 |
| 可观测 | Micrometer + Prometheus + OpenTelemetry | | 可观测 | Micrometer + Prometheus + OpenTelemetry |
@@ -60,8 +60,8 @@ lingniu-vehicle-ingest/
│ ├── gb32960-ingest-app/ GB32960 TCP 接入 + Kafka 投递 │ ├── gb32960-ingest-app/ GB32960 TCP 接入 + Kafka 投递
│ ├── jt808-ingest-app/ JT808 TCP 接入 + Kafka 投递 │ ├── jt808-ingest-app/ JT808 TCP 接入 + Kafka 投递
│ ├── yutong-mqtt-app/ 宇通 MQTT 接入 + Kafka 投递 │ ├── yutong-mqtt-app/ 宇通 MQTT 接入 + Kafka 投递
│ ├── vehicle-history-app/ 历史查询 + 原始归档索引消费 │ ├── vehicle-history-app/ TDengine 历史查询 + RAW JSON
│ └── vehicle-analytics-app/ 车辆状态/日统计消费 │ └── vehicle-analytics-app/ JT808 每日里程指标消费
├── docs/ 架构文档、模块图、实施计划 ├── docs/ 架构文档、模块图、实施计划
└── reference/ 参考资料 └── reference/ 参考资料
``` ```

View File

@@ -43,12 +43,38 @@ class MavenModuleProfileTest {
"modules/apps/xinda-push-app"); "modules/apps/xinda-push-app");
} }
@Test
void readmeMatchesCurrentRuntimeVersionsAndSplitAppResponsibilities() throws Exception {
Document pom = rootPom();
String readme = Files.readString(repositoryRoot().resolve("README.md"));
assertThat(readme)
.contains("Spring Boot " + projectProperty(pom, "spring-boot.version"))
.contains("Netty " + projectProperty(pom, "netty.version"))
.contains("Eclipse Paho " + projectProperty(pom, "paho-mqtt.version"))
.contains("vehicle-history-app/ TDengine 历史查询 + RAW JSON")
.contains("vehicle-analytics-app/ JT808 每日里程指标消费")
.doesNotContain("Spring Boot 3.4")
.doesNotContain("Netty 4.1")
.doesNotContain("HiveMQ MQTT Client")
.doesNotContain("车辆状态/日统计消费");
}
private static Document rootPom() throws Exception { private static Document rootPom() throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
return factory.newDocumentBuilder().parse(Files.newInputStream(repositoryRoot().resolve("pom.xml"))); return factory.newDocumentBuilder().parse(Files.newInputStream(repositoryRoot().resolve("pom.xml")));
} }
private static String projectProperty(Document pom, String name) {
Element properties = firstDirectChild(pom.getDocumentElement(), "properties");
Element property = firstDirectChild(properties, name);
if (property == null) {
throw new IllegalArgumentException("project property not found: " + name);
}
return property.getTextContent().trim();
}
private static List<String> defaultModules(Document pom) { private static List<String> defaultModules(Document pom) {
Element project = pom.getDocumentElement(); Element project = pom.getDocumentElement();
return directModules(firstDirectChild(project, "modules")); return directModules(firstDirectChild(project, "modules"));