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;