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; }