Browse Source

REPORT-137327 远程设计下切换目录卡顿优化 优化命名

fbp/merge
Destiny.Lin 2 months ago
parent
commit
c1e283382b
  1. 8
      designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java
  2. 10
      designer-realize/src/main/java/com/fanruan/config/SetupDataDesignerRemoteOperator.java

8
designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java vendored

@ -12,7 +12,7 @@ import com.fanruan.carina.annotions.Stop;
import com.fanruan.carina.annotions.Supplemental;
import com.fanruan.config.ConfigProviderFactory;
import com.fanruan.config.LocalConfigSource;
import com.fanruan.config.UpDataDesignerRemoteOperator;
import com.fanruan.config.SetupDataDesignerRemoteOperator;
import com.fanruan.config.realm.ConfigRealm;
import com.fanruan.dao.context.DBContextProvider;
import com.fanruan.dao.context.DBContextStarter;
@ -52,7 +52,7 @@ import com.fr.config.holder.ConfigChangeListener;
import com.fr.config.holder.ValidateConfigManger;
import com.fr.config.impl.ConfConfigProviderImpl;
import com.fr.config.impl.ConfigInsecurityElementProviderImpl;
import com.fr.config.utils.UpDataHelper;
import com.fr.config.utils.SetupDataHelper;
import com.fr.decision.service.context.ServiceContext;
import com.fr.design.backup.EnvBackupHelper;
import com.fr.env.detect.EnvDetectorCenter;
@ -353,7 +353,7 @@ public class DesignEnvComponent {
DaoContext.setXmlEntityDao(new RemoteXmlEntityDao());
DaoContext.setClassHelperDao(new RemoteClassHelperDao());
DaoContext.setEntityDao(new RemoteEntityDao());
UpDataHelper.getInstance().registerOperator(UpDataDesignerRemoteOperator.getInstance());
SetupDataHelper.getInstance().registerOperator(SetupDataDesignerRemoteOperator.getInstance());
} else {
//本地
TransactorFactory.setTransactor(new HibernateTransactor());
@ -372,7 +372,7 @@ public class DesignEnvComponent {
private void stopConfConfig() {
UpDataHelper.getInstance().resetOperator();
SetupDataHelper.getInstance().resetOperator();
DaoContext.setClassHelperDao(null);
DaoContext.setEntityDao(null);
DaoContext.setXmlEntityDao(null);

10
designer-realize/src/main/java/com/fanruan/config/UpDataDesignerRemoteOperator.java → designer-realize/src/main/java/com/fanruan/config/SetupDataDesignerRemoteOperator.java

@ -4,7 +4,7 @@ import com.fanruan.repository.ConfigRepository;
import com.fr.config.utils.ConfData;
import com.fr.config.utils.ConfigReadUtils;
import com.fr.config.utils.PrefixHandler;
import com.fr.config.utils.UpDataOperator;
import com.fr.config.utils.SetupDataOperator;
import com.fr.stable.StringUtils;
/**
@ -14,19 +14,19 @@ import com.fr.stable.StringUtils;
* @since 11.0
* Created on 2024/10/14
*/
public class UpDataDesignerRemoteOperator implements UpDataOperator {
public class SetupDataDesignerRemoteOperator implements SetupDataOperator {
private static final UpDataDesignerRemoteOperator INSTANCE = new UpDataDesignerRemoteOperator();
private static final SetupDataDesignerRemoteOperator INSTANCE = new SetupDataDesignerRemoteOperator();
/**
* 单例
*/
public static UpDataDesignerRemoteOperator getInstance() {
public static SetupDataDesignerRemoteOperator getInstance() {
return INSTANCE;
}
@Override
public ConfData getUpData(String prefix, String tenantId) {
public ConfData getData(String prefix, String tenantId) {
return ConfigRepository.getInstance().getConfigByConfigsCache(getConfigNameSpace(prefix), () -> {
ConfData data = new ConfData();
data.setDataMap(ConfigReadUtils.getData(prefix, tenantId));
Loading…
Cancel
Save