feat: 添加SQLite数据库支持并迁移数据转换脚本
- 新增init_sqlite.py脚本,用于将MySQL转储文件转换为SQLite数据库 - 实现MySQL到SQLite的语法转换,包括数据类型映射、表结构清理等功能 - 在pom.xml中替换MySQL驱动为SQLite驱动,并添加JDBC依赖 - 更新application.yml配置文件,切换数据库连接从MySQL到SQLite - 配置HikariCP连接池参数以适配SQLite数据库特性
This commit is contained in:
@@ -2,12 +2,22 @@ server:
|
||||
port: 9090
|
||||
|
||||
# 数据库配置
|
||||
# MySQL原始配置
|
||||
#spring:
|
||||
# datasource:
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# username: root
|
||||
# password: 123456
|
||||
# url: jdbc:mysql://localhost:3306/psychologicaltreatment?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
|
||||
|
||||
# SQLite
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: 123456
|
||||
url: jdbc:mysql://localhost:3306/psychologicaltreatment?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
|
||||
driver-class-name: org.sqlite.JDBC
|
||||
url: jdbc:sqlite:psychologicaltreatment.db
|
||||
hikari:
|
||||
maximum-pool-size: 1
|
||||
minimum-idle: 1
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB
|
||||
|
||||
Reference in New Issue
Block a user