From 825e118477517262f8cfb12674c875a71a6ba2b3 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 3 Jul 2024 14:21:51 +0800 Subject: [PATCH] =?UTF-8?q?=20REPORT-114392=20FR-FBP=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=AE=BE=E8=AE=A1=E9=80=82=E9=85=8D=20?= =?UTF-8?q?=E5=8E=BB=E9=99=A4Activator=E4=BD=93=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/boot/env/DesignEnvComponent.java | 21 +++++++++++++++++++ .../env/function/ChartDesignerComponent.java | 5 ++++- .../env/function/app/DesignAppComponent.java | 10 +++++++-- .../start/module/DesignerInitActivator.java | 2 +- 4 files changed, 34 insertions(+), 4 deletions(-) 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 949357cfec..d42a973282 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 @@ -109,6 +109,27 @@ import java.util.Objects; }) public class DesignEnvComponent { + /** + * prepare + */ + @Supplemental + public void prepare() { + Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder + .method(ElementMatchers.isAnnotatedWith(Focus.class)) + .intercept(MethodDelegation.to(FocusInterceptor.class)))); + Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder + .method(ElementMatchers.isAnnotatedWith(Compute.class)) + .intercept(MethodDelegation.to(MonitorInterceptor.class)))); + Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder + .method(ElementMatchers.isAnnotatedWith(DBMetrics.class)) + .intercept(MethodDelegation.to(DBMonitorInterceptor.class)))); + Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder + .method(ElementMatchers.isAnnotatedWith(PerformancePoint.class)) + .intercept(MethodDelegation.to(PerformancePointInterceptor.class)))); + Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder + .method(ElementMatchers.isAnnotatedWith(FaultTolerance.class)) + .intercept(MethodDelegation.to(FaultToleranceInterceptor.class)))); + } @Start public void start() throws Exception { diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/function/ChartDesignerComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/function/ChartDesignerComponent.java index abed4ff9f3..d710ca363d 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/function/ChartDesignerComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/function/ChartDesignerComponent.java @@ -66,7 +66,10 @@ public class ChartDesignerComponent { ChartTypeInterfaceManager.addPluginChangedListener(); } - @Override + /** + * prepare + */ + @Supplemental public void prepare() { Carina.getApplicationContext().group(InterMutableKey.class).add(LocaleMarker.create("com/fr/design/i18n/chart", LocaleScope.DESIGN)); } diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/function/app/DesignAppComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/function/app/DesignAppComponent.java index 5892dd8660..e2f59dba9c 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/function/app/DesignAppComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/function/app/DesignAppComponent.java @@ -38,7 +38,10 @@ public class DesignAppComponent { PluginRemote.getInstance().start(); } - @Override + /** + * stop + */ + @Stop public void stop() { List appList = new ArrayList<>(Carina.getApplicationContext().group(AppGroup.class).getAll()); @@ -48,7 +51,10 @@ public class DesignAppComponent { PluginRemote.getInstance().stop(); } - @Override + /** + * prepare + */ + @Supplemental public void prepare() { Carina.getApplicationContext().group(AppGroup.class).addAll(new CptApp(), new CptxApp(), new FormApp(), new XlsApp(), new XlsxApp()); } diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java index af08df31d6..a3c271d3eb 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java @@ -3,7 +3,7 @@ package com.fr.start.module; import com.fanruan.boot.key.StartupArgsShell; import com.fanruan.carina.Carina; import com.fr.design.PluginClassRefreshManager; -import com.fr.design.mainframe.app.DesignerAppUtils; +import com.fanruan.boot.env.function.app.DesignerAppUtils; import com.fr.io.repository.base.fs.FileSystemRepository; import com.fr.io.utils.ResourceIOUtils; import com.fr.module.Activator;