Browse Source

Merge remote-tracking branch 'origin/fbp/release' into fbp/release

fbp/merge
lemon 3 months ago
parent
commit
09454262b4
  1. 4
      designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java
  2. 32
      designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java

4
designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java

@ -13,7 +13,6 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.security.encryption.transmission.TransmissionEncryptionManager;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.workspace.server.repository.connection.ConnectionRepository; import com.fr.workspace.server.repository.connection.ConnectionRepository;
import com.fr.workspace.server.repository.tabledata.TableDataRepository; import com.fr.workspace.server.repository.tabledata.TableDataRepository;
@ -73,14 +72,11 @@ public class TreeTableDataComboBox extends UIComboBox {
Map<String, TableData> map = new HashMap<>(); Map<String, TableData> map = new HashMap<>();
final Map<String, Connection> connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll()); final Map<String, Connection> connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll());
try { try {
TransmissionEncryptionManager.setTransEncryptionLevel(1);
for (ServerDataSetBean bean : beans) { for (ServerDataSetBean bean : beans) {
map.put(bean.getDatasetName() , TableDataBeanHelper.getTableDataSet(connectionMap, bean.getDatasetType(), bean.getDatasetData())); map.put(bean.getDatasetName() , TableDataBeanHelper.getTableDataSet(connectionMap, bean.getDatasetType(), bean.getDatasetData()));
} }
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} finally {
TransmissionEncryptionManager.removeTransEncryptionLevel();
} }
for (Map.Entry<String, TableData> entry : map.entrySet()) { for (Map.Entry<String, TableData> entry : map.entrySet()) {
TableData tableData = entry.getValue(); TableData tableData = entry.getValue();

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

@ -55,6 +55,7 @@ import com.fr.env.detect.EnvDetectorCenter;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.log.Log4jConfig; import com.fr.general.log.Log4jConfig;
import com.fr.general.log.Log4jConfigFactory;
import com.fr.general.log.Log4jUtils; import com.fr.general.log.Log4jUtils;
import com.fr.intelli.metrics.Compute; import com.fr.intelli.metrics.Compute;
import com.fr.intelli.metrics.DBMonitorInterceptor; import com.fr.intelli.metrics.DBMonitorInterceptor;
@ -88,6 +89,7 @@ import com.fr.stable.db.session.DBSession;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.tenant.context.TenantContext; import com.fr.tenant.context.TenantContext;
import com.fr.tenant.context.provider.CurrentTenantKey; import com.fr.tenant.context.provider.CurrentTenantKey;
import com.fr.third.apache.logging.log4j.Level;
import com.fr.third.apache.logging.log4j.core.config.Configurator; import com.fr.third.apache.logging.log4j.core.config.Configurator;
import com.fr.third.net.bytebuddy.implementation.MethodDelegation; import com.fr.third.net.bytebuddy.implementation.MethodDelegation;
import com.fr.third.net.bytebuddy.matcher.ElementMatchers; import com.fr.third.net.bytebuddy.matcher.ElementMatchers;
@ -244,6 +246,8 @@ public class DesignEnvComponent {
* ----------- logger -------- * ----------- logger --------
*/ */
private void startLogger() { private void startLogger() {
// 获取本地的日志级别配置
Log4jConfigFactory.getInstance().setRootLevel(Log4jConfig.getInstance().getRootLevel());
URI uri = Log4jUtils.buildUserConfigURI(StringUtils.EMPTY); URI uri = Log4jUtils.buildUserConfigURI(StringUtils.EMPTY);
FRLogger.getLogger().config(uri); FRLogger.getLogger().config(uri);
// 日志配置更新的监听在FRLogger里面,fbp去掉了但是设计器本地还是需要这个监听的,初始化的时候监听一下 // 日志配置更新的监听在FRLogger里面,fbp去掉了但是设计器本地还是需要这个监听的,初始化的时候监听一下
@ -251,21 +255,19 @@ public class DesignEnvComponent {
} }
private void listenConfig() { private void listenConfig() {
/// 等fbp改完,现在先配合打包注释掉 ValidateConfigManger.getInstance().registerListener(new ConfigChangeListener() {
// ValidateConfigManger.getInstance().registerListener(new ConfigChangeListener() {
// @Override
// @Override public boolean accept(Class<? extends Configuration> configClass) {
// public boolean accept(Class<? extends Configuration> configClass) { return configClass.equals(Log4jConfig.class);
// return configClass.equals(Log4jConfig.class); }
// }
// @Override
// @Override public void change() {
// public void change() { // The root logger is the topmost logger with a name of "" (the empty string).
// // The root logger is the topmost logger with a name of "" (the empty string). Configurator.setAllLevels("", Log4jConfig.getInstance().getRootLevel());
// Configurator.setAllLevels("", Log4jConfig.getInstance().getRootLevel()); }
// } });
// });
} }
private void stopLogger() { private void stopLogger() {

Loading…
Cancel
Save