数采模块搭建
This commit is contained in:
parent
d9a12c0f44
commit
6861b12a6d
10
pom.xml
10
pom.xml
@ -35,6 +35,7 @@
|
||||
<logback.version>1.2.13</logback.version>
|
||||
<spring-security.version>5.7.14</spring-security.version>
|
||||
<spring-framework.version>5.3.39</spring-framework.version>
|
||||
<dynamic.version>3.4.1</dynamic.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
@ -107,6 +108,13 @@
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 动态数据源-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>${dynamic.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 解析客户端操作系统、浏览器等 -->
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
@ -183,6 +191,7 @@
|
||||
<version>${kaptcha.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mybatis-Plus -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
@ -235,6 +244,7 @@
|
||||
<module>shgx-generator</module>
|
||||
<module>shgx-common</module>
|
||||
<module>shgx-moldmanagement</module>
|
||||
<module>shgx-dryingroom</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
||||
@ -43,6 +43,12 @@
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Postgres驱动包 -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>shgx</groupId>
|
||||
|
||||
@ -2,26 +2,37 @@
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 内网数据库
|
||||
url: jdbc:mysql://192.168.1.48:3306/shgx_injection_web?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: 123456
|
||||
|
||||
# 外网数据库
|
||||
# url: jdbc:mysql://139.224.232.211:3308/shgx_injection_web?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
# 内网数据库
|
||||
password: 123456
|
||||
# 外网数据库
|
||||
# username: root
|
||||
# password: doantech123
|
||||
# MySQL专用校验语句
|
||||
druid:
|
||||
validation-query: SELECT 1 FROM DUAL # 仅MySQL需要dual表
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
enabled: true
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://192.168.1.48:5432/shgx_injection_web?useUnicode=true&characterEncoding=utf8&useSSL=true
|
||||
username: postgres
|
||||
password: 123456
|
||||
# Postgres专用连接校验语句,无需dual表
|
||||
druid:
|
||||
validation-query: SELECT 1
|
||||
test-while-idle: true # 空闲时校验连接(默认开启,确保生效)
|
||||
test-on-borrow: false # 避免获取连接时频繁校验,提升性能
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
@ -41,7 +52,7 @@ spring:
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
validationQuery:
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
|
||||
44
shgx-dryingroom/pom.xml
Normal file
44
shgx-dryingroom/pom.xml
Normal file
@ -0,0 +1,44 @@
|
||||
<?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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>shgx</groupId>
|
||||
<artifactId>shgx</artifactId>
|
||||
<version>3.9.0</version>
|
||||
</parent>
|
||||
<!-- 烘料房温度数采与报警 -->
|
||||
<artifactId>shgx-dryingroom</artifactId>
|
||||
|
||||
<description>烘料房温度数采与报警模块</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>shgx</groupId>
|
||||
<artifactId>shgx-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.5.14</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -8,7 +8,7 @@
|
||||
<artifactId>shgx</artifactId>
|
||||
<version>3.9.0</version>
|
||||
</parent>
|
||||
<!-- 模具管理-->
|
||||
<!-- 模具管理 -->
|
||||
<artifactId>shgx-moldmanagement</artifactId>
|
||||
|
||||
<description>
|
||||
@ -28,6 +28,7 @@
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.5.14</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user