1. 统一包名修改
This commit is contained in:
@@ -30,7 +30,7 @@ public class IotOtaFirmwareCreateReqVO {
|
||||
// TODO @li:是不是必传哈
|
||||
private String signMethod;
|
||||
|
||||
@Schema(description = "固件文件 URL", requiredMode = REQUIRED, example = "https://www.iocoder.cn/cloud-firmware.zip")
|
||||
@Schema(description = "固件文件 URL", requiredMode = REQUIRED, example = "https://www.iocoder.cn/zt-firmware.zip")
|
||||
@NotEmpty(message = "固件文件 URL 不能为空")
|
||||
private String fileUrl;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 提供 RESTful API 给前端:
|
||||
* 1. admin 包:提供给管理后台 cloud-ui-admin 前端项目
|
||||
* 2. app 包:提供给用户 APP cloud-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
|
||||
* 1. admin 包:提供给管理后台 zt-ui-admin 前端项目
|
||||
* 2. app 包:提供给用户 APP zt-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
|
||||
*/
|
||||
package com.zt.plat.module.iot.controller;
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.Properties;
|
||||
* IoT 模块的 Scheduler 管理类,基于 Quartz 实现
|
||||
*
|
||||
* 疑问:为什么 IoT 模块不复用全局的 SchedulerManager 呢?
|
||||
* 回复:cloud-cloud 项目,使用的是 XXL-Job 作为调度中心,无法动态添加任务。
|
||||
* 回复:zt-cloud 项目,使用的是 XXL-Job 作为调度中心,无法动态添加任务。
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
|
||||
@@ -71,7 +71,7 @@ mybatis-plus:
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
banner: false # 关闭控制台的 Banner 打印
|
||||
type-aliases-package: ${cloud.info.base-package}.dal.dataobject
|
||||
type-aliases-package: ${zt.info.base-package}.dal.dataobject
|
||||
encryptor:
|
||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
||||
|
||||
@@ -126,15 +126,15 @@ xxl:
|
||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
||||
accessToken: default_token # 执行器通讯TOKEN
|
||||
|
||||
--- #################### ZT相关配置 ####################
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
cloud:
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: com.zt.plat.module.iot
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.cloud.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
url: http://dashboard.zt.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
xss:
|
||||
enable: false
|
||||
exclude-urls: # 如下 url,仅仅是为了演示,去掉配置也没关系
|
||||
@@ -142,7 +142,7 @@ cloud:
|
||||
swagger:
|
||||
title: 管理后台
|
||||
description: 提供管理员管理的所有功能
|
||||
version: ${cloud.info.version}
|
||||
version: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
ignore-urls:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<configuration>
|
||||
<!-- 引用 Spring Boot 的 logback 基础配置 -->
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||
<!-- 变量 cloud.info.base-package,基础业务包 -->
|
||||
<springProperty scope="context" name="cloud.info.base-package" source="cloud.info.base-package"/>
|
||||
<!-- 变量 zt.info.base-package,基础业务包 -->
|
||||
<springProperty scope="context" name="zt.info.base-package" source="zt.info.base-package"/>
|
||||
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level:级别从左显示 5 个字符宽度,%msg:日志消息,%n是换行符 -->
|
||||
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
plugin.id=cloud-module-iot-plugin-emqx
|
||||
plugin.class=com.zt.plat.module.iot.plugin.emqx.config.IotEmqxPlugin
|
||||
plugin.version=1.0.0
|
||||
plugin.provider=cloud
|
||||
plugin.dependencies=
|
||||
plugin.description=cloud-module-iot-plugin-emqx-1.0.0
|
||||
@@ -12,7 +12,7 @@ import java.time.Duration;
|
||||
*
|
||||
* @author haohao
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "cloud.iot.plugin.common")
|
||||
@ConfigurationProperties(prefix = "zt.iot.plugin.common")
|
||||
@Validated
|
||||
@Data
|
||||
public class IotPluginCommonProperties {
|
||||
@@ -19,7 +19,7 @@ import static com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConsta
|
||||
/**
|
||||
* IoT 设备配置设置 Vertx Handler
|
||||
*
|
||||
* ZT源码
|
||||
* 芋道源码
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@@ -17,7 +17,7 @@ import static com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConsta
|
||||
/**
|
||||
* IoT 设备 OTA 升级 Vertx Handler
|
||||
* <p>
|
||||
* ZT源码
|
||||
* 芋道源码
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@@ -19,7 +19,7 @@ import static com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConsta
|
||||
/**
|
||||
* IoT 设备服务获取 Vertx Handler
|
||||
*
|
||||
* ZT源码
|
||||
* 芋道源码
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@@ -19,7 +19,7 @@ import static com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConsta
|
||||
/**
|
||||
* IoT 设置设备属性 Vertx Handler
|
||||
*
|
||||
* ZT源码
|
||||
* 芋道源码
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@@ -19,7 +19,7 @@ import static com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConsta
|
||||
/**
|
||||
* IoT 设备服务调用 Vertx Handler
|
||||
*
|
||||
* ZT源码
|
||||
* 芋道源码
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@@ -0,0 +1,6 @@
|
||||
plugin.id=zt-module-iot-plugin-emqx
|
||||
plugin.class=com.zt.plat.module.iot.plugin.emqx.config.IotEmqxPlugin
|
||||
plugin.version=1.0.0
|
||||
plugin.provider=zt
|
||||
plugin.dependencies=
|
||||
plugin.description=zt-module-iot-plugin-emqx-1.0.0
|
||||
@@ -31,7 +31,7 @@ public class IotPluginEmqxAutoConfiguration {
|
||||
@Bean
|
||||
public MqttClient mqttClient(Vertx vertx, IotPluginEmqxProperties emqxProperties) {
|
||||
MqttClientOptions options = new MqttClientOptions()
|
||||
.setClientId("cloud-iot-downstream-" + IdUtil.fastSimpleUUID())
|
||||
.setClientId("zt-iot-downstream-" + IdUtil.fastSimpleUUID())
|
||||
.setUsername(emqxProperties.getMqttUsername())
|
||||
.setPassword(emqxProperties.getMqttPassword())
|
||||
.setSsl(emqxProperties.getMqttSsl());
|
||||
@@ -9,7 +9,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "cloud.iot.plugin.emqx")
|
||||
@ConfigurationProperties(prefix = "zt.iot.plugin.emqx")
|
||||
@Validated
|
||||
@Data
|
||||
public class IotPluginEmqxProperties {
|
||||
@@ -1,19 +1,19 @@
|
||||
spring:
|
||||
application:
|
||||
name: cloud-module-iot-plugin-emqx
|
||||
name: zt-module-iot-plugin-emqx
|
||||
|
||||
cloud:
|
||||
zt:
|
||||
iot:
|
||||
plugin:
|
||||
common:
|
||||
upstream-url: http://127.0.0.1:48080
|
||||
downstream-port: 8100
|
||||
plugin-key: cloud-module-iot-plugin-emqx
|
||||
plugin-key: zt-module-iot-plugin-emqx
|
||||
emqx:
|
||||
mqtt-host: 127.0.0.1
|
||||
mqtt-port: 1883
|
||||
mqtt-ssl: false
|
||||
mqtt-username: cloud
|
||||
mqtt-username: zt
|
||||
mqtt-password: 123456
|
||||
mqtt-topics:
|
||||
- "/sys/#"
|
||||
@@ -1,6 +1,6 @@
|
||||
plugin.id=cloud-module-iot-plugin-http
|
||||
plugin.id=zt-module-iot-plugin-http
|
||||
plugin.class=com.zt.plat.module.iot.plugin.http.config.IotHttpVertxPlugin
|
||||
plugin.version=1.0.0
|
||||
plugin.provider=cloud
|
||||
plugin.provider=zt
|
||||
plugin.dependencies=
|
||||
plugin.description=cloud-module-iot-plugin-http-1.0.0
|
||||
plugin.description=zt-module-iot-plugin-http-1.0.0
|
||||
@@ -4,7 +4,7 @@ import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@ConfigurationProperties(prefix = "cloud.iot.plugin.http")
|
||||
@ConfigurationProperties(prefix = "zt.iot.plugin.http")
|
||||
@Validated
|
||||
@Data
|
||||
public class IotPluginHttpProperties {
|
||||
@@ -1,13 +1,13 @@
|
||||
spring:
|
||||
application:
|
||||
name: cloud-module-iot-plugin-http
|
||||
name: zt-module-iot-plugin-http
|
||||
|
||||
cloud:
|
||||
zt:
|
||||
iot:
|
||||
plugin:
|
||||
common:
|
||||
upstream-url: http://127.0.0.1:48080
|
||||
downstream-port: 8093
|
||||
plugin-key: cloud-module-iot-plugin-http
|
||||
plugin-key: zt-module-iot-plugin-http
|
||||
http:
|
||||
server-port: 8092
|
||||
Reference in New Issue
Block a user