mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-08-03 06:17:03 +08:00
Improve startup speed
This commit is contained in:
@ -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,
|
||||
]);
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class SystemController {
|
||||
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 class SystemController {
|
||||
// String version = ConfigUtils.getLatestLocalVersion();
|
||||
// log.error("clientVersion:{},version:{}", clientVersion, version);
|
||||
// if (!StringUtils.equals(clientVersion, version)) {
|
||||
stop();
|
||||
stop();
|
||||
//}
|
||||
}
|
||||
return DataResult.of("ok");
|
||||
|
Reference in New Issue
Block a user