后端升级(Cloud版)
大约 3 分钟frameworkintro
架构说明
BladeX 物联网平台基于 BladeX 的开源版 https://gitee.com/smallc/SpringBlade 开发,开源版基于Apache2.0开源协议,无需购买BladeX企业版,便可完整使用物联网平台的功能。
BladeX 在开源版的基础上,底层架构设计的功能更为强大,能够更好的支撑物联网平台的业务需求,同时也提供了更多的功能和特性。更多介绍请看:BladeX
一、准备工作
打开
BladeX-Links
工程,将blade-core
目录拷贝至BladeX
工程,具体改动如下图。打开
BladeX
工程根目录的pom.xml
文件,按照下图拷贝对应配置,注意不要复制错位置。- 在
<properties></properties>
节点内添加如下配置
<!-- db 相关 --> <iotdb.version>1.3.2</iotdb.version> <taos.version>3.3.0</taos.version> <influxdb.v2.version>7.2.0</influxdb.v2.version> <commons-csv.vresion>1.12.0</commons-csv.vresion> <!-- mica 相关 --> <mica.mqtt.version>3.1.6</mica.mqtt.version> <mica.auto.version>3.1.4</mica.auto.version> <mica.http.version>2.7.18.6</mica.http.version> <!-- amqp 相关 --> <amqp.client.version>5.21.0</amqp.client.version> <beetl.version>3.16.2.RELEASE</beetl.version> <aviator.version>5.4.3</aviator.version> <nashorn.version>15.4</nashorn.version>
- 在
<modules></modules>
节点内添加如下配置
<!-- 添加blade-core模块 --> <module>blade-core</module>
- 在
<dependencies></dependencies>
节点内添加如下配置
<!-- iotDB 时序库相关 --> <dependency> <groupId>org.apache.iotdb</groupId> <artifactId>iotdb-session</artifactId> <version>${iotdb.version}</version> </dependency> <!-- taos --> <dependency> <groupId>com.taosdata.jdbc</groupId> <artifactId>taos-jdbcdriver</artifactId> <version>${taos.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> </exclusions> </dependency> <!-- influxdb v2.x --> <dependency> <groupId>com.influxdb</groupId> <artifactId>influxdb-client-java</artifactId> <version>${influxdb.v2.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-csv</artifactId> <version>${commons-csv.vresion}</version> </dependency> <!-- mica相关 --> <dependency> <groupId>net.dreamlu</groupId> <artifactId>mica-mqttx-server-spring-boot-starter</artifactId> <version>${mica.mqtt.version}</version> </dependency> <dependency> <groupId>net.dreamlu</groupId> <artifactId>mica-mqttx-client-spring-boot-starter</artifactId> <version>${mica.mqtt.version}</version> </dependency> <dependency> <groupId>net.dreamlu</groupId> <artifactId>mica-mqttx-client</artifactId> <version>${mica.mqtt.version}</version> </dependency> <dependency> <groupId>net.dreamlu</groupId> <artifactId>mica-mqttx-common</artifactId> <version>${mica.mqtt.version}</version> </dependency> <!-- amqp --> <dependency> <groupId>com.rabbitmq</groupId> <artifactId>amqp-client</artifactId> <version>${amqp.client.version}</version> </dependency> <!-- nashorn --> <dependency> <groupId>org.openjdk.nashorn</groupId> <artifactId>nashorn-core</artifactId> <version>${nashorn.version}</version> </dependency> <dependency> <groupId>org.springblade</groupId> <artifactId>blade-links-base</artifactId> <version>${revision}</version> </dependency> <dependency> <groupId>org.springblade</groupId> <artifactId>blade-links-core</artifactId> <version>${revision}</version> </dependency> <dependency> <groupId>org.springblade</groupId> <artifactId>blade-tsdb-api</artifactId> <version>${revision}</version> </dependency> <dependency> <groupId>org.springblade</groupId> <artifactId>blade-tsdb-influxdb</artifactId> <version>${revision}</version> </dependency> <dependency> <groupId>org.springblade</groupId> <artifactId>blade-tsdb-influxdb2</artifactId> <version>${revision}</version> </dependency> <dependency> <groupId>org.springblade</groupId> <artifactId>blade-tsdb-iotdb</artifactId> <version>${revision}</version> </dependency> <dependency> <groupId>org.springblade</groupId> <artifactId>blade-tsdb-tdengine</artifactId> <version>${revision}</version> </dependency> <!-- beetl --> <dependency> <groupId>com.ibeetl</groupId> <artifactId>beetl</artifactId> <version>${beetl.version}</version> </dependency> <!-- aviator 脚本引擎 --> <dependency> <groupId>com.googlecode.aviator</groupId> <artifactId>aviator</artifactId> <version>${aviator.version}</version> </dependency> <!-- mica工具包 --> <dependency> <groupId>net.dreamlu</groupId> <artifactId>mica-http</artifactId> <version>${mica.http.version}</version> </dependency> <dependency> <groupId>net.dreamlu</groupId> <artifactId>mica-auto</artifactId> <version>${mica.auto.version}</version> <scope>provided</scope> </dependency>
- 在
打开
BladeX-Links
工程,按照下图拷贝覆盖至BladeX
工程对应目录,并添加对应配置。覆盖后调整相关配置以适配Cloud模式
全局替换类路径以适配Cloud模式
打开
Saber3
工程,全局替换/proxy
前缀为空。
二、测试编译
打开
BladeX
工程,执行打包命令测试是否正常,若能编译成功则说明后端切换至BladeX架构成功。