diff --git a/chat2db-client/src/main/preload.js b/chat2db-client/src/main/preload.js index 91b9616d9..769230fcd 100644 --- a/chat2db-client/src/main/preload.js +++ b/chat2db-client/src/main/preload.js @@ -17,14 +17,14 @@ contextBridge.exposeInMainWorld('electronApi', { const child = spawn(path.join(__dirname, '../..', `./static/${JAVA_PATH}`), [ '-noverify', - '-jar', - '-Xmx1024M', `-Dspring.profiles.active=${isTest ? 'test' : 'release'}`, '-Dserver.address=127.0.0.1', '-Dchat2db.mode=DESKTOP', `-Dproject.path=${javaPath}`, `-Dloader.path=${libPath}`, `-Dclient.version=${readVersion()}`, + '-Xmx1024M', + '-jar', javaPath, ]); diff --git a/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/system/SystemController.java b/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/system/SystemController.java index 99e8153ed..6d0db0a45 100644 --- a/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/system/SystemController.java +++ b/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/system/SystemController.java @@ -56,7 +56,7 @@ public DataResult get() { String clientVersion = System.getProperty("client.version"); String version = ConfigUtils.getLatestLocalVersion(); log.error("clientVersion:{},version:{}", clientVersion, version); - if (!StringUtils.equals(clientVersion, version)) { + if (!StringUtils.equals(clientVersion, version) && !StringUtils.isEmpty(clientVersion)) { stop(); return null; } else { @@ -146,7 +146,7 @@ public DataResult stop(boolean forceQuit) { // String version = ConfigUtils.getLatestLocalVersion(); // log.error("clientVersion:{},version:{}", clientVersion, version); // if (!StringUtils.equals(clientVersion, version)) { - stop(); + stop(); //} } return DataResult.of("ok");