Browse Source

Pull request #15464: REPORT-139789 fix: FBP SystemOptionProvider 放到 extra-decision

Merge in DESIGN/design from ~ANNER/design:fbp/feature to fbp/feature

* commit '21d1260dfdd9029aa186fa7945a56b5e32d47187':
  REPORT-139789 fix: FBP SystemOptionProvider 放到 extra-decision
fbp/feature
Anner-王敬松 1 month ago
parent
commit
8193b51aa7
  1. 10
      designer-realize/src/main/java/com/fanruan/boot/adaptation/ReportAdaptationComponent.java

10
designer-realize/src/main/java/com/fanruan/boot/adaptation/ReportAdaptationComponent.java

@ -4,6 +4,7 @@ import com.fanruan.carina.Carina;
import com.fanruan.carina.annotions.DependsOn; import com.fanruan.carina.annotions.DependsOn;
import com.fanruan.carina.annotions.FineComponent; import com.fanruan.carina.annotions.FineComponent;
import com.fanruan.carina.annotions.Start; import com.fanruan.carina.annotions.Start;
import com.fanruan.carina.context.ContextListener;
import com.fanruan.plugins.resource.PluginResourceHelper; import com.fanruan.plugins.resource.PluginResourceHelper;
import com.fanruan.portal.FinePortal; import com.fanruan.portal.FinePortal;
import com.fanruan.portal.module.PortalModule; import com.fanruan.portal.module.PortalModule;
@ -23,7 +24,6 @@ import com.fr.general.InterProviderImpl;
import com.fr.locale.InterMutableKey; import com.fr.locale.InterMutableKey;
import com.fr.locale.LocaleMarker; import com.fr.locale.LocaleMarker;
import com.fr.locale.LocaleScope; import com.fr.locale.LocaleScope;
import com.fr.plugin.ExtraClassManager;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.observer.PluginEventType; import com.fr.plugin.observer.PluginEventType;
@ -167,9 +167,13 @@ public class ReportAdaptationComponent {
} }
private void registerPluginModules() { private void registerPluginModules() {
Carina.getApplicationContext().addListener(new ContextListener() {
@Override
public void onStart() {
// 注册插件模块 // 注册插件模块
try { try {
Set<SystemOptionProvider> systemOptionProviders = ExtraClassManager.getInstance().getArray(SystemOptionProvider.XML_TAG); Set<SystemOptionProvider> systemOptionProviders = ExtraDecisionClassManager.getInstance().getArray(SystemOptionProvider.XML_TAG);
if (!CollectionUtils.isEmpty(systemOptionProviders)) { if (!CollectionUtils.isEmpty(systemOptionProviders)) {
// 资源引入采用新的方式,WebCoalition接口不再继承使用,这里只处理模块注册 // 资源引入采用新的方式,WebCoalition接口不再继承使用,这里只处理模块注册
for (SystemOptionProvider optionProvider : systemOptionProviders) { for (SystemOptionProvider optionProvider : systemOptionProviders) {
@ -187,6 +191,8 @@ public class ReportAdaptationComponent {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
});
}
private void checkI18n() { private void checkI18n() {
for (LocaleMarker marker : Carina.getApplicationContext().group(InterMutableKey.class).getAll()) { for (LocaleMarker marker : Carina.getApplicationContext().group(InterMutableKey.class).getAll()) {
if (marker.match(LocaleScope.SERVER)) { if (marker.match(LocaleScope.SERVER)) {

Loading…
Cancel
Save