Skip to content

Commit 90f40b1

Browse files
committed
refactor(database): 重构数据库配置和连接逻辑以支持多数据库模式
refactor(database): 重构数据库配置和连接逻辑以支持多数据库模式 将 Configuration 类中的 DatabaseMode 改为静态变量,并调整相关方法为静态方法 重构 DatabaseController 的连接逻辑,根据配置动态选择 MySQL 或 SQLite 数据库 更新 Main 类使用静态配置方法,并完善使用说明和联系信息 同时更新 .gitignore 忽略 SQLite 数据库文件 ``` 这个提交消息: 1. 使用 refactor 类型,因为主要是代码结构调整和优化 2. 添加了 scope(database) 说明修改范围 3. 简明扼要地描述了主要修改内容 4. 在正文中详细说明了具体的重构点 5. 保持了简洁和专业性,同时涵盖了所有重要修改 参考 [#2](#2) 和 [#1](#1) Co-Authored-By: 🇨🇳钟智强 『上饶满星科技』 <[email protected]>
2 parents 0a0c0b7 + d5dda76 commit 90f40b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/xin/ctkqiang/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static void main(String[] args) {
8383
*
8484
* 嘻嘻,这样就能轻轻松松切换数据库, 你棒棒啦!🎀🌸💖
8585
*/
86-
Configuration.setDatabaseMode(Database.SQLITE);
86+
Configuration.setDatabaseMode(Database.MYSQL);
8787

8888
int pages = userUtil.askForPositiveInt("📄 想爬多少页咧~?【建议填个50以上更爽!】");
8989
boolean isExport = userUtil.askForYesNo("💾 要不要顺便导出数据嘞?(支持 .csv/.json/.sql哦)✨:");

0 commit comments

Comments
 (0)