refactor: 网关数据库驱动由 MySQL 切换为 PostgreSQL
- pom:mysql-connector-j 换为 postgresql。 - application(.prod).yml:JDBC URL 改为 jdbc:postgresql://,默认账号改 root。 - 网关只连主库 iot_platform(open_client / open_webhook / open_api_log),不连业务库, 无需感知后端的共享业务库与租户插件。
This commit is contained in:
@@ -56,10 +56,10 @@
|
|||||||
<version>${mybatis-plus.version}</version>
|
<version>${mybatis-plus.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- MySQL 驱动 -->
|
<!-- PostgreSQL 驱动 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mysql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ server:
|
|||||||
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: ${DB_URL:jdbc:mysql://127.0.0.1:14406/iot_platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true}
|
url: ${DB_URL:jdbc:postgresql://127.0.0.1:5432/iot_platform}
|
||||||
username: ${DB_USERNAME:iot_app}
|
username: ${DB_USERNAME:root}
|
||||||
password: ${DB_PASSWORD:}
|
password: ${DB_PASSWORD:}
|
||||||
|
|
||||||
gateway:
|
gateway:
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ spring:
|
|||||||
name: iot-open-gateway
|
name: iot-open-gateway
|
||||||
|
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
url: ${DB_URL:jdbc:mysql://127.0.0.1:3306/iot_platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true}
|
url: ${DB_URL:jdbc:postgresql://127.0.0.1:5432/iot_platform}
|
||||||
username: ${DB_USERNAME:iot_app}
|
username: ${DB_USERNAME:root}
|
||||||
password: ${DB_PASSWORD:}
|
password: ${DB_PASSWORD:}
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
|
|||||||
Reference in New Issue
Block a user