From 61e3629c7ab2f8b15636614399bfa9300d2f2f29 Mon Sep 17 00:00:00 2001 From: 张晓波 <bingbo1993@126.com> Date: 星期三, 18 十月 2023 16:39:17 +0800 Subject: [PATCH] 苏州配置文件简化 --- hd/pipe/StaffManage/src/main/java/com/thhy/staff/utils/MqUtils.java | 3 +++ hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxConfig.java | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxConfig.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxConfig.java index 9cbf72b..e8d1042 100644 --- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxConfig.java +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxConfig.java @@ -29,7 +29,8 @@ @Override public String toString() { - return "{" + + return "{\"host\":\""+host+"\",\"login\":\""+login+"\",\"password\":\""+password+"\",\"port\":"+port+",\"qos\":1}"; + /*return "{" + "host:'" + host + '\'' + ", port:'" + port + '\'' + ", login:'" + login + '\'' + @@ -38,6 +39,6 @@ ", topic:'" + topic + '\'' + ", willTopic:'" + willTopic + '\'' + ", willContent:'" + willContent + '\'' + - '}'; + '}';*/ } } diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/utils/MqUtils.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/utils/MqUtils.java index 0d5790a..0bc6aee 100644 --- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/utils/MqUtils.java +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/utils/MqUtils.java @@ -64,6 +64,9 @@ emqxConfig.setLogin("thhy"); emqxConfig.setPassword("Thhy@123"); + System.out.println(JSON.toJSONString(emqxConfig)); + System.out.println(emqxConfig.toString()); + List<String> list = new ArrayList<>(); list.add("0A:0C:E1:25:75:2C"); -- Gitblit v1.9.3