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> <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>
+2 -2
View File
@@ -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:
+3 -3
View File
@@ -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: