From 6fc2a4752766fb78f2f311d14160dc08b48ee94e Mon Sep 17 00:00:00 2001 From: kerwincui <164770707@qq.com> Date: Tue, 24 May 2022 10:29:06 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/springboot/wumei-admin/src/main/resources/application.yml b/springboot/wumei-admin/src/main/resources/application.yml index 6637f1ac..60297c88 100644 --- a/springboot/wumei-admin/src/main/resources/application.yml +++ b/springboot/wumei-admin/src/main/resources/application.yml @@ -8,7 +8,7 @@ ruoyi: copyrightYear: 2021 # 实例演示开关 demoEnabled: true - # 文件路径 示例( Windows配置D:/wumei-smart/uploadPath,Linux配置 /var/wumei-smart/java/uploadPath) + # 文件路径,以uploadPath结尾 示例( Windows配置D:/wumei-smart/uploadPath,Linux配置 /var/wumei-smart/java/uploadPath) profile: /var/wumei-smart/java/uploadPath # 获取ip地址开关 addressEnabled: true @@ -43,7 +43,7 @@ spring: # 国际化资源文件路径 basename: i18n/messages profiles: - active: dev + active: druid # 文件上传 servlet: multipart: @@ -65,7 +65,7 @@ spring: # 数据库索引 database: 0 # 密码 - password: + password: wumei-smart # 连接超时时间 timeout: 10s lettuce: @@ -80,13 +80,12 @@ spring: max-wait: -1ms # mqtt 配置 mqtt: - username: wumei-smart # 账号 - password: wumei-smart # 密码 - host-url: tcp://wumei.live:1883 # mqtt连接tcp地址 - # host-url: tcp://127.0.0.1:1883 - client-id: ${random.value} # 客户端Id,每个启动的id要不同 随机:${random.value} - default-topic: test # 默认主题 - timeout: 100 # 超时时间 + username: wumei-smart # 账号 + password: wumei-smart # 密码 + host-url: tcp://localhost:1883 # mqtt连接tcp地址 + client-id: ${random.int} # 客户端Id,不能相同,采用随机数 ${random.value} + default-topic: test # 默认主题 + timeout: 30000 # 超时时间 keepalive: 30 # 保持连接 clearSession: true # 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息) task: From 416935e53033b6d4fb2abea5a2ab81fdb7974992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=8F=E9=81=87=E8=80=8C=E5=AE=89?= <164770707@qq.com> Date: Tue, 24 May 2022 04:14:00 +0000 Subject: [PATCH 2/7] update README.md. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 5bbaed04..390a36c2 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,9 @@ kerwincui/wumei-smart:1.1 | [SXH](https://gitee.com/sixiaohu) | [Redamancy_zxp](https://gitee.com/redamancy-zxp) | [LEE](https://gitee.com/yueming188) | [LemonTree](https://gitee.com/fishhunterplus) | [Tang](https://gitee.com/mexiaotang) |--|--|--|--|--| +| [xxmfl](https://gitee.com/xxmfl) | +|--| + ### 九、部分图片 From 1970b9f007e2403d8779691d6103d69ef734a372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=8F=E9=81=87=E8=80=8C=E5=AE=89?= <164770707@qq.com> Date: Tue, 24 May 2022 04:16:43 +0000 Subject: [PATCH 3/7] update README.md. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 390a36c2..cb04cbb6 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ * [Mqtt消息服务器EMQX4.0](https://github.com/emqx/emqx) * [ESP8266 Core For Arduino](https://github.com/esp8266/Arduino) * [uCharts高性能跨平台图表库](https://www.ucharts.cn) +* [TDengine](https://www.taosdata.com/?zh) + ##### Docker快速安装 * Mysql中创建wumei-smart数据库,[导入Sql脚本](https://gitee.com/kerwincui/wumei-smart/tree/master/springboot/sql) * 修改命令中的Mysql配置,并执行 From 8a1db44119836bd847ff335c69646212520d845e Mon Sep 17 00:00:00 2001 From: kerwincui <164770707@qq.com> Date: Tue, 24 May 2022 12:20:46 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/iot/tdengine/init/ApplicationStarted.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/init/ApplicationStarted.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/init/ApplicationStarted.java index 44bc356f..58f338fc 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/init/ApplicationStarted.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/init/ApplicationStarted.java @@ -33,9 +33,9 @@ public class ApplicationStarted implements ApplicationRunner { TDengineConfig tDengineConfig = applicationContext.getBean(TDengineConfig.class); TDDeviceLogDAO tDDeviceLogDAO = applicationContext.getBean(TDDeviceLogDAO.class); initTDengine(tDengineConfig, tDDeviceLogDAO); - System.out.println("初始化TDengine成功"); + LOGGER.info("使用TDengine存储设备数据,初始化成功"); }else{ - System.out.println("MySQL初始化成功"); + LOGGER.info("使用MySql存储设备数据,初始化成功"); } } @@ -52,10 +52,9 @@ public class ApplicationStarted implements ApplicationRunner { String dbName = dengineConfig.getDbName(); int db = deviceLogMapper.createDB(dbName); deviceLogMapper.createSTable(dbName); - System.out.println(db); } catch (Exception e) { e.printStackTrace(); - System.out.println("ERROR"); + LOGGER.info("错误",e.getMessage()); } } From d25d81967d85d5b369d84c012b3a91b1aa50317a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=8F=E9=81=87=E8=80=8C=E5=AE=89?= <164770707@qq.com> Date: Tue, 24 May 2022 04:28:07 +0000 Subject: [PATCH 5/7] update README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cb04cbb6..2ee2713e 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ * [Mqtt消息服务器EMQX4.0](https://github.com/emqx/emqx) * [ESP8266 Core For Arduino](https://github.com/esp8266/Arduino) * [uCharts高性能跨平台图表库](https://www.ucharts.cn) -* [TDengine](https://www.taosdata.com/?zh) +* [TDengine时序数据库](https://www.taosdata.com/?zh) ##### Docker快速安装 * Mysql中创建wumei-smart数据库,[导入Sql脚本](https://gitee.com/kerwincui/wumei-smart/tree/master/springboot/sql) From ca688aa9751319c0ea0b1389ab8429638ef88109 Mon Sep 17 00:00:00 2001 From: kerwincui <164770707@qq.com> Date: Tue, 24 May 2022 13:21:53 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=A4=87=E6=B3=A8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/iot/tdengine/init/ApplicationStarted.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/init/ApplicationStarted.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/init/ApplicationStarted.java index 58f338fc..7d38f986 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/init/ApplicationStarted.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/init/ApplicationStarted.java @@ -50,11 +50,12 @@ public class ApplicationStarted implements ApplicationRunner { public void initTDengine(TDengineConfig dengineConfig, TDDeviceLogDAO deviceLogMapper) { try { String dbName = dengineConfig.getDbName(); + // TODO 目前还不支持自动创建数据库 int db = deviceLogMapper.createDB(dbName); deviceLogMapper.createSTable(dbName); } catch (Exception e) { - e.printStackTrace(); LOGGER.info("错误",e.getMessage()); + e.printStackTrace(); } } From 315f9f8d185e204da08a3b3e9d9b88cb9d0db666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=8F=E9=81=87=E8=80=8C=E5=AE=89?= <164770707@qq.com> Date: Tue, 24 May 2022 05:23:24 +0000 Subject: [PATCH 7/7] update springboot/wumei-admin/src/main/resources/application-druid.yml. --- .../wumei-admin/src/main/resources/application-druid.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/springboot/wumei-admin/src/main/resources/application-druid.yml b/springboot/wumei-admin/src/main/resources/application-druid.yml index ad6dbaf8..f8135ae5 100644 --- a/springboot/wumei-admin/src/main/resources/application-druid.yml +++ b/springboot/wumei-admin/src/main/resources/application-druid.yml @@ -17,9 +17,10 @@ spring: username: password: - #TDengine数据库 + # TDengine数据库 tdengine-server: - enabled: true + # 默认不启用TDengine,true=启用,false=不启用 + enabled: false driverClassName: com.taosdata.jdbc.TSDBDriver url: jdbc:TAOS://127.0.0.1:6030/wumei_smart_log?timezone=Asia/Beijing&charset=utf-8 username: root