Browse Source

REPORT-139789 fix: FBP SystemOptionProvider 放到 extra-decision

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

Loading…
Cancel
Save