去掉不必要的 websocket 开关
This commit is contained in:
parent
a07f686aec
commit
97e09d2666
@ -67,8 +67,6 @@ data:
|
||||
port: 8086 # adxp-adapter端口
|
||||
username: dianxin # 登录用户名
|
||||
password: dianxin@123 # 登录密码
|
||||
websocket:
|
||||
enabled: true # 启用WebSocket连接
|
||||
```
|
||||
|
||||
## 测试工具
|
||||
|
||||
@ -105,9 +105,6 @@ data:
|
||||
password: ${ADXP_PASSWORD:dianxin@123}
|
||||
# 重连延迟(毫秒)
|
||||
reconnect-delay-millis: 3000
|
||||
# WebSocket连接启用
|
||||
websocket:
|
||||
enabled: true
|
||||
|
||||
# 无人车厂商数据源配置 - 开发环境
|
||||
vehicle-api:
|
||||
|
||||
@ -33,22 +33,9 @@ public class FlightSdkProperties {
|
||||
* 重连延迟(毫秒)
|
||||
*/
|
||||
private long reconnectDelayMillis = 3000L;
|
||||
|
||||
/**
|
||||
* WebSocket配置
|
||||
*/
|
||||
private WebSocketConfig websocket = new WebSocketConfig();
|
||||
|
||||
public boolean isConfigurationReady() {
|
||||
return host != null && port != null && port > 0
|
||||
&& username != null && password != null;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class WebSocketConfig {
|
||||
/**
|
||||
* 是否启用WebSocket连接
|
||||
*/
|
||||
private boolean enabled = true;
|
||||
}
|
||||
}
|
||||
@ -116,8 +116,7 @@ public class DataCollectorService {
|
||||
private void initWebSocketClient() {
|
||||
if (adxpFlightServiceWebSocketClient != null &&
|
||||
adxpFlightServiceClient != null &&
|
||||
adxpFlightServiceClient.getProperties() != null &&
|
||||
adxpFlightServiceClient.getProperties().getWebsocket().isEnabled()) {
|
||||
adxpFlightServiceClient.getProperties() != null) {
|
||||
try {
|
||||
adxpFlightServiceWebSocketClient.addMessageListener(this::handleFlightNotifications);
|
||||
// WebSocket客户端会在PostConstruct时自动连接
|
||||
@ -126,7 +125,7 @@ public class DataCollectorService {
|
||||
log.error("初始化WebSocket客户端失败", e);
|
||||
}
|
||||
} else {
|
||||
log.info("WebSocket客户端未启用或未配置");
|
||||
log.info("WebSocket客户端未配置");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user