模块名调整

V0.5.x
xiwa 2022-06-30 15:08:45 +08:00
parent 2802cf42ed
commit 57fce9102a
333 changed files with 811 additions and 612 deletions

View File

@ -17,7 +17,7 @@
"name": "MQTT标准协议组件",
"type": "device",
"protocol": "mqtt",
"jarFile": "mqtt-component-0.2.1-SNAPSHOT.jar",
"jarFile": "iot-mqtt-component-0.3.1-SNAPSHOT.jar",
"config": "{\"port\":1883,\"ssl\":false,\"type\":\"server\"}",
"converter": "6260396d67aced2696184053",
"state": "running",

6
oauth2-server/pom.xml → iot-auth-server/pom.xml Executable file → Normal file
View File

@ -5,11 +5,11 @@
<parent>
<artifactId>iotkit-parent</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>oauth2-server</artifactId>
<artifactId>iot-auth-server</artifactId>
<dependencies>
@ -45,7 +45,7 @@
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>dao</artifactId>
<artifactId>iot-dao</artifactId>
</dependency>
<dependency>

View File

@ -0,0 +1 @@
此模块为认证服务提供oauth2认证界面和接口

4
common/pom.xml → iot-common/pom.xml Executable file → Normal file
View File

@ -5,11 +5,11 @@
<parent>
<artifactId>iotkit-parent</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>common</artifactId>
<artifactId>iot-common</artifactId>
<dependencies>

1
iot-common/readme.txt Normal file
View File

@ -0,0 +1 @@
此模块为通用业务逻辑或工具类

View File

@ -58,7 +58,7 @@ public class ComponentClassLoader {
public static <T> T getComponent(String name, File jarFile) throws Exception {
String className = addUrl(name, jarFile);
Class<T> componentClass = findClass(name, className);
return componentClass.newInstance();
return componentClass.getDeclaredConstructor().newInstance();
}
}

BIN
iot-components/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>component</artifactId>
<artifactId>iot-component-base</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
@ -19,13 +19,13 @@
<dependencies>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>converter</artifactId>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<groupId>cc.iotkit</groupId>
<artifactId>iot-component-converter</artifactId>
</dependency>
</dependencies>

Binary file not shown.

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>converter</artifactId>
<artifactId>iot-component-converter</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
@ -29,13 +29,13 @@
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>model</artifactId>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<groupId>cc.iotkit</groupId>
<artifactId>iot-model</artifactId>
</dependency>
</dependencies>

Binary file not shown.

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>component-server</artifactId>
<artifactId>iot-component-server</artifactId>
<dependencies>
@ -64,32 +64,32 @@
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>common</artifactId>
<artifactId>iot-common</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>converter</artifactId>
<artifactId>iot-component-converter</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>model</artifactId>
<artifactId>iot-model</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>dao</artifactId>
<artifactId>iot-dao</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>component</artifactId>
<artifactId>iot-component-base</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>message-bus</artifactId>
<artifactId>iot-message-bus</artifactId>
</dependency>
</dependencies>

View File

@ -94,7 +94,7 @@ public class DeviceComponentManager {
try {
componentInstance = ComponentClassLoader.getComponent(component.getId(), file);
} catch (Throwable e) {
throw new BizException("get device component instance error");
throw new BizException("get device component instance error", e);
}
componentInstance.create(new CompConfig(300, component.getConfig()));
@ -204,17 +204,17 @@ public class DeviceComponentManager {
}
String sendMid = message.getMid();
long timeout=deviceComponent.getConfig().getCmdTimeout();
long timeout = deviceComponent.getConfig().getCmdTimeout();
//保存设备端mid与平台mid对应关系
saveMidMapping(message,timeout,service.getMid());
saveMidMapping(message, timeout, service.getMid());
//发送消息给设备
message = deviceComponent.send(message);
//mid发生改变
if (!sendMid.equals(message.getMid())) {
//重新保存消息id映射
saveMidMapping(message,timeout,service.getMid());
saveMidMapping(message, timeout, service.getMid());
}
//产生下发消息

View File

@ -80,7 +80,7 @@ public class DeviceBehaviourService {
}
Optional<Product> optProduct = productRepository.findById(pk);
if (!optProduct.isPresent()) {
if (optProduct.isEmpty()) {
throw new BizException("Product does not exist");
}
Product product = optProduct.get();

Binary file not shown.

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ctwing-component</artifactId>
<artifactId>iot-ctwing-component</artifactId>
<properties>
@ -29,11 +29,6 @@
<artifactId>vertx-web-proxy</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>component</artifactId>
</dependency>
<dependency>
<groupId>com.ctg.ag</groupId>
<artifactId>ctg-ag-sdk-core</artifactId>
@ -46,6 +41,11 @@
<version>20220603.182201-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-component-base</artifactId>
</dependency>
</dependencies>
<build>

Binary file not shown.

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>emqx-component</artifactId>
<artifactId>iot-emqx-component</artifactId>
<build>
<plugins>
<plugin>
@ -73,24 +73,6 @@
<version>4.2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>model</artifactId>
<version>0.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>common</artifactId>
<version>0.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>component</artifactId>
<version>0.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.luaj</groupId>
<artifactId>luaj-jse</artifactId>
@ -99,8 +81,26 @@
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>dao</artifactId>
<version>0.3.0-SNAPSHOT</version>
<artifactId>iot-model</artifactId>
<version>0.3.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-dao</artifactId>
<version>0.3.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-common</artifactId>
<version>0.3.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-component-base</artifactId>
<version>0.3.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>emqx-component</artifactId>
<artifactId>iot-emqx-component</artifactId>
<dependencies>
@ -28,21 +28,6 @@
<artifactId>vertx-mqtt</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>model</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>common</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>component</artifactId>
</dependency>
<dependency>
<groupId>org.luaj</groupId>
<artifactId>luaj-jse</artifactId>
@ -50,8 +35,24 @@
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>dao</artifactId>
<artifactId>iot-model</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-dao</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-common</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-component-base</artifactId>
</dependency>
</dependencies>
<build>

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>http-biz-component</artifactId>
<artifactId>iot-http-biz-component</artifactId>
<build>
<plugins>
<plugin>
@ -57,8 +57,8 @@
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>component</artifactId>
<version>0.3.0-SNAPSHOT</version>
<artifactId>iot-component-base</artifactId>
<version>0.3.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>http-biz-component</artifactId>
<artifactId>iot-http-biz-component</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
@ -30,7 +30,7 @@
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>component</artifactId>
<artifactId>iot-component-base</artifactId>
</dependency>
</dependencies>

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mqtt-component</artifactId>
<artifactId>iot-mqtt-component</artifactId>
<build>
<plugins>
<plugin>
@ -79,20 +79,20 @@
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>common</artifactId>
<version>0.3.0-SNAPSHOT</version>
<artifactId>iot-common</artifactId>
<version>0.3.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>component</artifactId>
<version>0.3.0-SNAPSHOT</version>
<artifactId>iot-component-base</artifactId>
<version>0.3.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>dao</artifactId>
<version>0.3.0-SNAPSHOT</version>
<artifactId>iot-dao</artifactId>
<version>0.3.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>protocol-gateway</artifactId>
<artifactId>iot-components</artifactId>
<groupId>cc.iotkit</groupId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mqtt-component</artifactId>
<artifactId>iot-mqtt-component</artifactId>
<dependencies>
@ -45,17 +45,17 @@
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>common</artifactId>
<artifactId>iot-common</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>component</artifactId>
<artifactId>iot-component-base</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>dao</artifactId>
<artifactId>iot-dao</artifactId>
</dependency>
</dependencies>

Some files were not shown because too many files have changed in this diff Show More