Browse Source

Merge pull request #8977 in DESIGN/design from final/11.0 to release/11.0

* commit 'd43b77f937544bd86f2914cee106cb67b8392db7':
  REPORT-71790 配置也置为false
  REPORT-71790 【win11适配】FR11启动失败,报错npe
newui
superman 3 years ago
parent
commit
45444bb219
  1. 2
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 40
      designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

2
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -2220,7 +2220,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
writer.attr("layoutTemplateStyle", this.getLayoutTemplateStyle());
writer.attr("showServerDatasetAuthTip", this.isShowServerDatasetAuthTip());
writer.attr("useOptimizedUPM4Adapter", this.isUseOptimizedUPM4Adapter());
writer.attr("propertiesUsable", this.isPropertiesUsable());
writer.attr("propertiesUsable", false);
writer.end();
}

40
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) {

Loading…
Cancel
Save