我有以下方法
@AutoHandling(slot = FunctionalArea.PRE_MAIN_MENU)
@RequestMapping(method = RequestMethod.GET)
public String navigation(ModelMap model) {
logger.debug("navigation");
...
//First time to the Main Menu and ID-Level is ID-1 or greater
if (!callSession.getCallFlowData().isMainMenuPlayed()
&& callSession.getCallFlowData().getIdLevel() >= 1) {
// Call Auto Handling
logger.info("Call AutoHandling");
autoHandlingComponent.processAutoHandling();
}
...
return forward(returnView);
}
基本上我想做的是在 processAutoHandling() 上有一个切入点但是在@After 中,我需要将 slot() 用于@AutoHandling
我试过这个,但它没有被调用
@Pointcut("execution(* *.processAutoHandling())")
public void processAutoHandleCall() {
logger.debug("processAutoHandleCall");
}
@Around("processAutoHandleCall() &&" +
"@annotation(autoHandling) &&" +
"target(bean) "
)
public Object processAutoHandlingCall(ProceedingJoinPoint jp,
AutoHandling autoHandling,
Object bean)
throws Throwable {
...