diff --git a/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java b/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java index 71487b5649..34daece1dd 100644 --- a/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java @@ -87,14 +87,11 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS final Map connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll()); final Map tableDataMap = new HashMap<>(); try { - TransmissionEncryptionManager.setTransEncryptionLevel(1); for (ServerDataSetBean bean : beans) { tableDataMap.put(bean.getDatasetName() , TableDataBeanHelper.getTableDataSet(connectionMap, bean.getDatasetType(), bean.getDatasetData())); } } catch (Exception e) { throw new RuntimeException(e); - } finally { - TransmissionEncryptionManager.removeTransEncryptionLevel(); } final TableDataManagerPane globalTableDataPane = new TableDataManagerPane() { diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java index 1aaa2fb46a..cf3066f9eb 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java @@ -52,26 +52,19 @@ public class LocalConnectionSource extends BaseConnectionSource { @Override public String[] testConnection(ConnectionInfoBean database) throws Exception { try { - // 暂时这么处理,后续最好拉到外层包装一下 - TransmissionEncryptionManager.setTransEncryptionLevel(1); return ConnectionProcessorFactory.testConnectionWithSchemaReturn(database); } catch (DriverNotFoundException e) { throw new DriverUnExistException(); - } finally { - TransmissionEncryptionManager.removeTransEncryptionLevel(); } } @Override public void add(ConnectionInfoBean bean) throws Exception { try { - TransmissionEncryptionManager.setTransEncryptionLevel(1); Connection connection = ConnectionProcessorFactory.createConnection(bean); validate(bean.getConnectionName(), connection); ConnectionProcessorFactory.addConnection(bean); } catch (DriverNotFoundException e) { throw new DriverUnExistException(); - } finally { - TransmissionEncryptionManager.removeTransEncryptionLevel(); } } @@ -84,14 +77,11 @@ public class LocalConnectionSource extends BaseConnectionSource { @Override public void update(ConnectionInfoBean bean) throws Exception { try { - TransmissionEncryptionManager.setTransEncryptionLevel(1); Connection connection = ConnectionProcessorFactory.createConnection(bean); validate(bean.getConnectionName(), connection); ConnectionProcessorFactory.updateConnection(bean.getConnectionName(), bean); } catch (DriverNotFoundException e) { throw new DriverUnExistException(); - } finally { - TransmissionEncryptionManager.removeTransEncryptionLevel(); } } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java index 68f2584153..ad3f9ad14e 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java @@ -52,14 +52,11 @@ public class TableDataBeanHelper { final Map connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll()); final Map tableDataMap = new HashMap<>(); try { - TransmissionEncryptionManager.setTransEncryptionLevel(1); for (ServerDataSetBean bean : beans) { tableDataMap.put(bean.getDatasetName() , TableDataBeanHelper.getTableDataSet(connectionMap, bean.getDatasetType(), bean.getDatasetData())); } } catch (Exception e) { throw new RuntimeException(e); - } finally { - TransmissionEncryptionManager.removeTransEncryptionLevel(); } return tableDataMap; } diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignComponent.java index 8a31974196..06fe5526a2 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignComponent.java @@ -60,6 +60,7 @@ import com.fr.design.javascript.EmailPane; import com.fr.design.javascript.JavaScriptImplPane; import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.javascript.ProcessTransitionAdapter; +import com.fr.design.lock.TemplateLockInfoReSave; import com.fr.design.login.DesignerLoginType; import com.fr.design.login.guide.DesignerGuideHelper; import com.fr.design.login.message.DesignerMessageHelper; @@ -221,6 +222,7 @@ public class DesignComponent { DesignerWorkspaceLoader.init(); storePassport(); AlphaFineHelper.switchConfig4Locale(); + TemplateLockInfoReSave.startListener(); RPCConnectHandlerCenter.startListener(); RecoverManager.register(new RecoverForDesigner()); } @@ -534,6 +536,7 @@ public class DesignComponent { public void stop() { unloadLogAppender(); DesignerSocketIO.close(); + TemplateLockInfoReSave.stopListener(); } /**