diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java index 3829fc2a3c..8a4fb92073 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java @@ -35,6 +35,8 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; +import com.fr.workspace.server.entity.connection.ConnectionBean; +import com.fr.workspace.server.repository.connection.ConnectionRepository; import javax.swing.BorderFactory; import javax.swing.Box; @@ -176,8 +178,9 @@ public class ProcedureDataPane extends AbstractTableDataPane imp } private boolean isAutoParameterDatabase() { - Connection connection = ConnectionConfigProviderFactory.getConfigProvider().getConnection(connectionTableProcedurePane.getSelectedDatabaseConnnectonName()); - return connection == null ? false : ArrayUtils.contains(DRIVERS, connection.getDriver()); + ConnectionBean bean = ConnectionRepository.getInstance().getByName(connectionTableProcedurePane.getSelectedDatabaseConnnectonName()); + Connection connection = bean == null ? null : bean.getConnection(); + return connection != null && ArrayUtils.contains(DRIVERS, connection.getDriver()); } @Override diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java index 3ac33e309a..7c9350430a 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java @@ -31,6 +31,7 @@ import com.fr.cbb.dialect.security.InsecurityElementFactory; import com.fr.cluster.ClusterBridge; import com.fr.cluster.lock.ClusterLock; import com.fr.config.BaseDBEnv; +import com.fr.config.ConfigContext; import com.fr.config.ConfigEvent; import com.fr.config.Configuration; import com.fr.config.FinalPreferenceConfig; @@ -361,6 +362,7 @@ public class DesignEnvComponent { DaoContext.setEntityDao(null); DaoContext.setXmlEntityDao(null); Configurations.setHelper(null); + ConfigContext.destroyAllConfig(); } /**