From 4d89583adba4b6f0effeebaf065b91dab04f28f6 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 18 May 2022 20:29:28 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-71790=20=E3=80=90win11=E9=80=82=E9=85=8D?= =?UTF-8?q?=E3=80=91FR11=E5=90=AF=E5=8A=A8=E5=A4=B1=E8=B4=A5=EF=BC=8C?= =?UTF-8?q?=E6=8A=A5=E9=94=99npe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/start/module/DesignerStartup.java | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index 4149753f7..917de56f0 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -158,26 +158,26 @@ public class DesignerStartup extends Activator { private void registerDaoSelector() { // 注入设计器db cache 是否可用 - DesignerWorkspaceInfo info = WorkspaceUtils.getWorkspaceInfo(); - if (info.getType() == DesignerWorkspaceType.Remote) { - DaoSelectorFactory.registerDaoSelector(() -> false); - } else { - String webInfPath = WorkspaceUtils.getWorkspaceInfo().getPath(); - String dbConfigPath = StableUtils.pathJoin(webInfPath, ProjectConstants.CONFIG_DIRECTORY, - EncryptionConstants.PROPERTY_NAME); - String entityPath = generatePath(webInfPath, PropertiesConstants.ENTITY_PROP); - String xmlEntityPath = generatePath(webInfPath, PropertiesConstants.XML_ENTITY_PROP); - String classNamePath = generatePath(webInfPath, PropertiesConstants.CLASS_NAME_PROP); - // 校验 平台迁移文件/缓存文件 - boolean existPropCache = new File(entityPath).exists() && new File(xmlEntityPath).exists() && new File(classNamePath).exists(); - DaoSelectorFactory.registerDaoSelector(() -> DesignerEnvManager.getEnvManager().isPropertiesUsable() - && OptimizeUtil.isOpen() - && existPropCache - // demo启动时 前后目录可能会不一致 造成读取缓存失败 - && !startupArgsValue.getValue().isDemo() - && !new File(dbConfigPath).exists()); - - } + DaoSelectorFactory.registerDaoSelector(() -> false); +// DesignerWorkspaceInfo info = WorkspaceUtils.getWorkspaceInfo(); +// if (info.getType() == DesignerWorkspaceType.Remote) { +// } else { +// String webInfPath = WorkspaceUtils.getWorkspaceInfo().getPath(); +// String dbConfigPath = StableUtils.pathJoin(webInfPath, ProjectConstants.CONFIG_DIRECTORY, +// EncryptionConstants.PROPERTY_NAME); +// String entityPath = generatePath(webInfPath, PropertiesConstants.ENTITY_PROP); +// String xmlEntityPath = generatePath(webInfPath, PropertiesConstants.XML_ENTITY_PROP); +// String classNamePath = generatePath(webInfPath, PropertiesConstants.CLASS_NAME_PROP); +// // 校验 平台迁移文件/缓存文件 +// boolean existPropCache = new File(entityPath).exists() && new File(xmlEntityPath).exists() && new File(classNamePath).exists(); +// DaoSelectorFactory.registerDaoSelector(() -> DesignerEnvManager.getEnvManager().isPropertiesUsable() +// && OptimizeUtil.isOpen() +// && existPropCache +// // demo启动时 前后目录可能会不一致 造成读取缓存失败 +// && !startupArgsValue.getValue().isDemo() +// && !new File(dbConfigPath).exists()); +// +// } } private String generatePath(String webInfPath, String name) {