Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
T
topology
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
姜立玮
topology
Commits
16d84f43
Unverified
提交
16d84f43
authored
3 年前
作者:
姜小梨
提交者:
Gitee
3 年前
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update topology/topology.md.
123
上级
f5758739
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
64 行增加
和
25 行删除
+64
-25
topology.md
topology/topology.md
+64
-25
没有找到文件。
topology/topology.md
浏览文件 @
16d84f43
maven引入
# 组态后台集成
## maven引入
```
<dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<groupId>com.ruoyi</groupId>
<artifactId>topology</artifactId>
<artifactId>topology</artifactId>
<version>
具体版本
</version>
<version>具体版本</version>
</dependency>
</dependency>
```
组态说明
##
组态说明
1.
本项目pom.xml
1.
本项目pom.xml
```
<?xml version="1.0" encoding="UTF-8"?>
<?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"
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
...
@@ -153,24 +158,32 @@ maven引入
...
@@ -153,24 +158,32 @@ maven引入
</repository>
</repository>
</repositories>
</repositories>
</project>
</project>
```
2.
配置引入程序pom.xml
2.
配置引入程序pom.xml
去掉mybatis
-
去掉mybatis
```
<!-- <dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.mybatis.spring.boot</groupId>-->
<!-- <groupId>org.mybatis.spring.boot</groupId>-->
<!-- <artifactId>mybatis-spring-boot-starter</artifactId>-->
<!-- <artifactId>mybatis-spring-boot-starter</artifactId>-->
<!-- <version>2.2.0</version>-->
<!-- <version>2.2.0</version>-->
<!-- </dependency>-->
<!-- </dependency>-->
去掉分页
```
-
去掉分页
```
<!-- pagehelper 分页插件 -->
<!-- pagehelper 分页插件 -->
<dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.spring.boot.starter.version}</version>
<version>${pagehelper.spring.boot.starter.version}</version>
</dependency>
</dependency>
```
-
如果含有mybatis的话,程序启动时会报:NoClassDefFoundError: org/mybatis/logging/LoggerFactory
● 如果含有mybatis的话,程序启动时会报:NoClassDefFoundError: org/mybatis/logging/LoggerFactory
3.
配置application.yml
3.
配置application.yml
```
mybatis-plus:
mybatis-plus:
# 搜索指定包别名,;表示多个
# 搜索指定包别名,;表示多个
typeAliasesPackage: com.ruoyi.**.domain
typeAliasesPackage: com.ruoyi.**.domain
...
@@ -267,15 +280,18 @@ spring:
...
@@ -267,15 +280,18 @@ spring:
max-active: 8
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
max-wait: -1ms
```
4.
配置文件说明
4.
配置文件说明
● spring.datasource.type
可以自由进行配置
-
spring.datasource.type:
可以自由进行配置
● druid
中默认数据请执行配置
-
druid:
中默认数据请执行配置
● redis请执行
进行配置
-
redis:请
进行配置
● topology.profile
请执行根据需求进行配置,该配置为组态存入图片具体路径
-
topology.profile:
请执行根据需求进行配置,该配置为组态存入图片具体路径
●
mybatis-plus:
-
mybatis-plus:
#
搜索指定包别名,;表示多个
搜索指定包别名,;表示多个
typeAliasesPackage: com.ruoyi.
**
.domain 需添加自己的,多个使用,;来表示
typeAliasesPackage: com.ruoyi.
**
.domain 需添加自己的,多个使用,;来表示
● mybatis-config.xml 如下所示:
-
mybatis-config.xml 如下所示:
```
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
...
@@ -290,25 +306,42 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
...
@@ -290,25 +306,42 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
</settings>
</settings>
</configuration>
将文件放在resources下mybatis/mybatis-config.xml
</configuration>
```
将文件放在resources下mybatis/mybatis-config.xml
5.
代码中配置
5.
代码中配置
● 如果使用spring security配置
-
如果使用spring security配置
请在SecurityConfig类configure方法中添加如下所示代码
组态接口配置
请在SecurityConfig类configure方法中添加如下所示代码
<br>
组态接口配置
<br>
```
.antMatchers( "/topology/listAll" ).anonymous()
.antMatchers( "/topology/listAll" ).anonymous()
.antMatchers( "/topology/listAll" ).permitAll()
.antMatchers( "/topology/listAll" ).permitAll()
.antMatchers( "/topology/getTopology/**" ).anonymous()
.antMatchers( "/topology/getTopology/**" ).anonymous()
.antMatchers( "/topology/getTopology/**" ).permitAll()
.antMatchers( "/topology/getTopology/**" ).permitAll()
.antMatchers( "/params/**" ).anonymous()
.antMatchers( "/params/**" ).anonymous()
.antMatchers( "/params/**" ).permitAll()
.antMatchers( "/params/**" ).permitAll()
websocket设置
```
websocket设置
```
.antMatchers( "/topology/test" ).anonymous()
.antMatchers( "/topology/test" ).anonymous()
.antMatchers( "/mqttDemo/**" ).anonymous()
.antMatchers( "/mqttDemo/**" ).anonymous()
.antMatchers( "/imserver/**" ).anonymous()
.antMatchers( "/imserver/**" ).anonymous()
.antMatchers( "/sendMqttMessage" ).anonymous()
.antMatchers( "/sendMqttMessage" ).anonymous()
● 如果使用shiro配置
```
请在ShiroConfig类Shiro过滤器配置中添加如下所示代码
组态接口配置
-
如果使用shiro配置
请在ShiroConfig类Shiro过滤器配置中添加如下所示代码
<br>
组态接口配置
<br>
```
LinkedHashMap<String, String> filterChainDefinitionMap = new LinkedHashMap<>();
LinkedHashMap<String, String> filterChainDefinitionMap = new LinkedHashMap<>();
filterChainDefinitionMap.put( "/topology/listAll", "anon");
filterChainDefinitionMap.put( "/topology/listAll", "anon");
filterChainDefinitionMap.put( "/topology/listAll", "anon");
filterChainDefinitionMap.put( "/topology/listAll", "anon");
...
@@ -316,13 +349,19 @@ filterChainDefinitionMap.put( "/topology/getTopology/**" , "anon");
...
@@ -316,13 +349,19 @@ filterChainDefinitionMap.put( "/topology/getTopology/**" , "anon");
filterChainDefinitionMap.put( "/topology/getTopology/**" , "anon");
filterChainDefinitionMap.put( "/topology/getTopology/**" , "anon");
filterChainDefinitionMap.put( "/params/**" , "anon");
filterChainDefinitionMap.put( "/params/**" , "anon");
filterChainDefinitionMap.put( "/params/**" , "anon");
filterChainDefinitionMap.put( "/params/**" , "anon");
websocket设置
```
websocket设置
```
filterChainDefinitionMap.put( "/topology/test" , "anon");
filterChainDefinitionMap.put( "/topology/test" , "anon");
filterChainDefinitionMap.put( "/mqttDemo/**" , "anon");
filterChainDefinitionMap.put( "/mqttDemo/**" , "anon");
filterChainDefinitionMap.put("/imserver/**" , "anon");
filterChainDefinitionMap.put("/imserver/**" , "anon");
filterChainDefinitionMap.put("/sendMqttMessage" , "anon");
filterChainDefinitionMap.put("/sendMqttMessage" , "anon");
```
6.
sql文件
6.
sql文件
```
/*
/*
Navicat Premium Data Transfer
Navicat Premium Data Transfer
...
@@ -371,4 +410,4 @@ CREATE TABLE `images` (
...
@@ -371,4 +410,4 @@ CREATE TABLE `images` (
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '组态图片表' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '组态图片表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
SET FOREIGN_KEY_CHECKS = 1;
```
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论