Browse Source

Pull request #14528: REPORT-114392 FR-FBP版本本地设计适配 修复插件国际化问题

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp-1.0 to fbp-1.0

* commit '4342a81dd82a7191aff4ef0352c0966c3c3b849b':
  REPORT-114392 FR-FBP版本本地设计适配 修复插件国际化问题
fbp-1.0
Destiny.Lin-林锦龙 4 months ago
parent
commit
c7ceda5332
  1. 12
      designer-realize/src/main/java/com/fanruan/boot/env/DesignPluginComponent.java
  2. 5
      designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java
  3. 4
      designer-realize/src/main/java/com/fanruan/boot/pre/DesignPreStartComponent.java
  4. 2
      designer-realize/src/main/java/com/fr/start/CarinaDesigner.java

12
designer-realize/src/main/java/com/fanruan/boot/env/DesignPluginComponent.java vendored

@ -5,9 +5,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.plugin.autonomy.AutonomyClassManagerGroup;
import com.fanruan.plugin.autonomy.AutonomyClassManagerProvider;
import com.fr.plugin.ExtraClassManager;
import com.fanruan.carina.annotions.Supplemental;
import javax.servlet.ServletContext;
@ -22,6 +20,14 @@ import javax.servlet.ServletContext;
@DependsOn(dependencies = {"design_env_prepare"})
public class DesignPluginComponent extends PluginComponent {
/**
* prepare
*/
@Supplemental
public void prepare() {
super.prepare();
}
/**
* start
*/

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

@ -43,6 +43,8 @@ import com.fr.locale.InterMutableKey;
import com.fr.locale.LocaleMarker;
import com.fr.locale.LocaleScope;
import com.fr.locale.LocaleUtils;
import com.fr.locale.ResourceBundleKey;
import com.fr.locale.bundle.ResourceBundleGeneratorHolder;
import com.fr.log.FineLoggerFactory;
import com.fr.measure.DBMeterFactory;
import com.fr.plugin.manage.PluginManager;
@ -132,6 +134,9 @@ public class DesignPreLoadComponent {
*/
private void startI18n() {
// 自定义的ResourceBundle生成器
ResourceBundleGeneratorHolder.KEY.add(Carina.getApplicationContext().group(ResourceBundleKey.class).getAll());
for (LocaleMarker marker : Carina.getApplicationContext().group(InterMutableKey.class).getAll()) {
if (marker.match(LocaleScope.SERVER)) {
// richie:服务器端国际化的文件进来

4
designer-realize/src/main/java/com/fanruan/boot/pre/DesignPreStartComponent.java

@ -143,9 +143,7 @@ public class DesignPreStartComponent {
startPreload0();
DesignerLifecycleMonitorContext.getMonitor().beforeStart();
//启动运行时
FineRuntime.start();
//等 FineRuntime 启动后启动
DeepLinkManager.getInstance().start(Carina.getApplicationContext().singleton(StartupArgsShell.class).get().get());
startPreload1();

2
designer-realize/src/main/java/com/fr/start/CarinaDesigner.java

@ -12,6 +12,7 @@ import com.fr.design.carton.SwitchForSwingChecker;
import com.fr.log.FineLoggerFactory;
import com.fr.runtime.FineRuntime;
import com.fr.start.common.DesignerStartupContext;
import com.fr.start.module.StartupArgs;
import com.fr.start.server.ServletContextWrapper;
@ -46,6 +47,7 @@ public class CarinaDesigner extends MainDesigner{
Carina.getApplicationContext().singleton(StartupArgsShell.class).set(new StartupArgs(args));
Carina.getApplicationContext().singleton(LaunchType.class).set(LaunchType.DESIGNER);
DesignLauncher launch = new DesignLauncher("/com/fr/config/starter/designer-startup-carina.xml");
FineRuntime.start();
try {
FineLoggerFactory.getLogger().debug("Designer prepared.Time used {} ms", DesignerStartupContext.getRecorder().getTime(TimeUnit.MILLISECONDS));

Loading…
Cancel
Save