diff --git a/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java b/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java index da780298f5..22a1e3378c 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java @@ -13,6 +13,7 @@ import com.fr.design.layout.TableLayout; import com.fr.js.EmailJavaScript; import com.fr.stable.StringUtils; +import com.fr.workspace.server.repository.config.ConfigRepository; import javax.swing.BorderFactory; import javax.swing.JComponent; @@ -64,7 +65,7 @@ public class EmailPane extends FurtherBasicBeanPane { initCenterPane(mainTextLabel, scrollPane, fill, preferred); this.add(centerPane, BorderLayout.CENTER); mainTextEditor.setAutoscrolls(true); - checkEmailConfig(EmailCenter.isEmailConfigValid()); + checkEmailConfig(ConfigRepository.getInstance().isEmailConfigValid()); } /** @@ -128,7 +129,7 @@ public class EmailPane extends FurtherBasicBeanPane { if (showTplContent != null) { showTplContent.setSelected(ob ==null ? false: ob.isShowTplContent()); } - checkEmailConfig(EmailCenter.isEmailConfigValid()); + checkEmailConfig(ConfigRepository.getInstance().isEmailConfigValid()); } @Override diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java index b72a451fa4..f32fbe9d23 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java @@ -48,6 +48,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { contentDBManiPane = new ArrayList(); contentDBManiPane.add(createDBManipulationPane()); paneList.add(new Commit2DBJavaScriptPane(this, contentDBManiPane)); + paneList.add(initEmaiPane()); if (isWorkBookValid()) { paneList.add(new ExportJavaScriptPane()); } 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 7c9350430a..0ed7554075 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 @@ -100,6 +100,8 @@ import com.fr.transaction.HibernateTransactor; import com.fr.transaction.RemoteTransactor; import com.fr.transaction.TransactorFactory; import com.fr.workspace.WorkContext; +import com.fanruan.config.LocalConfigSource; +import com.fr.workspace.server.repository.config.LocalConfigSourceShell; import java.net.URI; import java.sql.Connection; @@ -121,7 +123,9 @@ import java.util.Properties; "com.fr.decision.workflow.bean", "com.fr.report.entity", "com.fr.cons.entity", - "com.fr.report.write.entity" + "com.fr.report.write.entity", + "com.fanruan.messenger.ums.entity", + "com.fanruan.messenger.oa.basic.db.entity" }) public class DesignEnvComponent { @@ -146,6 +150,7 @@ public class DesignEnvComponent { .method(ElementMatchers.isAnnotatedWith(FaultTolerance.class)) .intercept(MethodDelegation.to(FaultToleranceInterceptor.class)))); Carina.getApplicationContext().group(CurrentTenantKey.class).add(ScheduleThreadCurrentTenantProvider.INSTANCE); + Carina.getApplicationContext().singleton(LocalConfigSourceShell.class).set(new LocalConfigSource()); } @Start diff --git a/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java b/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java new file mode 100644 index 0000000000..11301e93c1 --- /dev/null +++ b/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java @@ -0,0 +1,19 @@ +package com.fanruan.config; + +import com.fr.base.email.EmailCenter; +import com.fr.workspace.server.repository.config.BaseConfigSource; + +/** + * 本地配置资源 + * + * @author Destiny.Lin + * @since 11.0 + * Created on 2024/8/29 + */ +public class LocalConfigSource extends BaseConfigSource { + + @Override + public boolean isEmailConfigValid() { + return EmailCenter.isEmailConfigValid(); + } +}