Browse Source

Pull request #14341: REPORT-126235 新增插件的classFinder

Merge in DESIGN/design from ~KERRY/design_10.0:mss/2.0 to mss/2.0

* commit '46e55e1af2d30ad247c32b9057e5cc2912822d2f':
  REPORT-126235  放开插件的classFinder
mss/2.0
kerry-王周勇 4 months ago
parent
commit
8a069f4f68
  1. 6
      designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java

6
designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java

@ -45,6 +45,7 @@ import com.fr.locale.LocaleScope;
import com.fr.locale.LocaleUtils; import com.fr.locale.LocaleUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.measure.DBMeterFactory; import com.fr.measure.DBMeterFactory;
import com.fr.plugin.manage.PluginManager;
import com.fr.record.DefaultDBMeter; import com.fr.record.DefaultDBMeter;
import com.fr.record.analyzer.EnableMetrics; import com.fr.record.analyzer.EnableMetrics;
import com.fr.record.analyzer.Metrics; import com.fr.record.analyzer.Metrics;
@ -56,6 +57,7 @@ import com.fr.stable.bridge.StableFactory;
import com.fr.stable.fun.WebLocaleProvider; import com.fr.stable.fun.WebLocaleProvider;
import com.fr.stable.plugin.ExtraClassManagerProvider; import com.fr.stable.plugin.ExtraClassManagerProvider;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.stable.resource.ResourceLoader;
import com.fr.stable.xml.StableXMLUtils; import com.fr.stable.xml.StableXMLUtils;
import com.fr.start.DesignerProcessType; import com.fr.start.DesignerProcessType;
import com.fr.start.module.StartupArgs; import com.fr.start.module.StartupArgs;
@ -216,6 +218,10 @@ public class DesignPreLoadComponent {
} }
return Class.forName(className, true, urlClassLoader); return Class.forName(className, true, urlClassLoader);
}); });
ClassFactory.getInstance().addFinder(className -> ResourceLoader.classForName(className));
ClassFactory.getInstance().addFinder(className -> Class.forName(className, true, PluginManager.getController().getClass().getClassLoader()));
} }

Loading…
Cancel
Save