mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
refactor(framework): remove log hook surrounded with method execute in AgentRunningSubModule
This commit is contained in:
@@ -12,24 +12,4 @@ public abstract class AgentRunningSubModule<I, O> extends Module {
|
|||||||
|
|
||||||
public abstract O execute(I data);
|
public abstract O execute(I data);
|
||||||
|
|
||||||
|
|
||||||
@BeforeExecute
|
|
||||||
private void beforeLog() {
|
|
||||||
log.debug("[{}] 模块执行开始...", getModuleName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@AfterExecute
|
|
||||||
private void afterLog() {
|
|
||||||
log.debug("[{}] 模块执行结束...", getModuleName());
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getModuleName(){
|
|
||||||
if (this.getClass().isAnnotationPresent(AgentModule.class)) {
|
|
||||||
return this.getClass().getAnnotation(AgentModule.class).name();
|
|
||||||
} else if (this.getClass().isAnnotationPresent(CoreModule.class)) {
|
|
||||||
return CoreModule.class.getAnnotation(AgentModule.class).name();
|
|
||||||
}else {
|
|
||||||
return "Unknown Module";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user