feat(config): 支持多数据库类型配置及动态分页方言
This commit is contained in:
@@ -1,13 +1,30 @@
|
||||
server:
|
||||
port: 8989
|
||||
|
||||
# 数据库类型:用于 MyBatis-Plus 分页方言等(仅方言,不负责连接信息)
|
||||
app:
|
||||
db-type: mysql # 可选:mysql | postgres | dm
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
# === MySQL 数据源(默认启用) ===
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://www.youlai.tech:3306/youlai_boot?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&allowMultiQueries=true
|
||||
username: youlai
|
||||
password: 123456
|
||||
|
||||
# === PostgreSQL 数据源示例(按需启用) ===
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/youlai_boot
|
||||
# username: postgres
|
||||
# password: 123456
|
||||
|
||||
# === 达梦 DM 数据源示例(按需启用,注意按实际驱动与 URL 调整) ===
|
||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# url: jdbc:dm://127.0.0.1:5236?schema=YOULAI_BOOT
|
||||
# username: SYSDBA
|
||||
# password: 123456
|
||||
data:
|
||||
redis:
|
||||
database: 0
|
||||
@@ -74,6 +91,8 @@ spring:
|
||||
response-format:
|
||||
type: json_object
|
||||
|
||||
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:/mapper/**/*.xml
|
||||
global-config:
|
||||
|
||||
Reference in New Issue
Block a user