【功能完善】IoT: 集成 Vert.x 支持,重构 HTTP 插件为 Vert.x 插件

This commit is contained in:
安浩浩
2025-01-07 23:13:57 +08:00
parent cde6ebf921
commit 77b89aad77
12 changed files with 355 additions and 288 deletions

View File

@@ -196,10 +196,8 @@ public class PluginInstanceServiceImpl implements PluginInstanceService {
.collect(Collectors.toMap(PluginInfoDO::getPluginKey, Function.identity()));
// 3. 获取本机 IP 和 MAC 地址
LinkedHashSet<InetAddress> localAddressList = NetUtil.localAddressList(t -> t instanceof Inet4Address);
LinkedHashSet<String> ipList = NetUtil.toIpList(localAddressList);
String ip = ipList.stream().findFirst().orElse("127.0.0.1");
String mac = NetUtil.getMacAddress(localAddressList.stream().findFirst().orElse(null));
String ip = NetUtil.getLocalhostStr();
String mac = NetUtil.getLocalMacAddress();
String mainId = MAIN_ID + "-" + mac;
// 4. 遍历插件列表,并保存为插件实例