From b9606007d235dd8afefee16658af05f70668d251 Mon Sep 17 00:00:00 2001 From: SwallowGG <1558143046@qq.com> Date: Tue, 12 Dec 2023 23:22:20 +0800 Subject: [PATCH] Improve startup speed --- .../main/java/ai/chat2db/server/domain/repository/Dbutils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat2db-server/chat2db-server-domain/chat2db-server-domain-repository/src/main/java/ai/chat2db/server/domain/repository/Dbutils.java b/chat2db-server/chat2db-server-domain/chat2db-server-domain-repository/src/main/java/ai/chat2db/server/domain/repository/Dbutils.java index a780b13fc..fa252c438 100644 --- a/chat2db-server/chat2db-server-domain/chat2db-server-domain-repository/src/main/java/ai/chat2db/server/domain/repository/Dbutils.java +++ b/chat2db-server/chat2db-server-domain/chat2db-server-domain-repository/src/main/java/ai/chat2db/server/domain/repository/Dbutils.java @@ -146,7 +146,7 @@ private static DataSource initDataSource() { String environment = StringUtils.defaultString(System.getProperty("spring.profiles.active"), "dev"); if ("dev".equalsIgnoreCase(environment)) { dataSource.setJdbcUrl("jdbc:h2:file:~/.chat2db/db/chat2db_dev;MODE=MYSQL"); - } if ("test".equalsIgnoreCase(environment)) { + }else if ("test".equalsIgnoreCase(environment)) { dataSource.setJdbcUrl("jdbc:h2:file:~/.chat2db/db/chat2db_test;MODE=MYSQL"); }else { dataSource.setJdbcUrl("jdbc:h2:~/.chat2db/db/chat2db;MODE=MYSQL;FILE_LOCK=NO");