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:
wjh
2026-10-10 11:47:14 +08:00
parent 12920d698a
commit 96de9298ba
3 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -56,10 +56,10 @@
<version>${mybatis-plus.version}</version>
</dependency>
<!-- MySQL 驱动 -->
<!-- PostgreSQL 驱动 -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
+2 -2
View File
@@ -3,8 +3,8 @@ server:
spring:
datasource:
url: ${DB_URL:jdbc:mysql://127.0.0.1:14406/iot_platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true}
username: ${DB_USERNAME:iot_app}
url: ${DB_URL:jdbc:postgresql://127.0.0.1:5432/iot_platform}
username: ${DB_USERNAME:root}
password: ${DB_PASSWORD:}
gateway:
+3 -3
View File
@@ -6,9 +6,9 @@ spring:
name: iot-open-gateway
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${DB_URL:jdbc:mysql://127.0.0.1:3306/iot_platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true}
username: ${DB_USERNAME:iot_app}
driver-class-name: org.postgresql.Driver
url: ${DB_URL:jdbc:postgresql://127.0.0.1:5432/iot_platform}
username: ${DB_USERNAME:root}
password: ${DB_PASSWORD:}
mybatis-plus: