COLA
COLA copied to clipboard
请教@CatchAndLog为什么是提供service级别的logging和exception处理,@CatchAndLog作为Controller的切面不是更合理吗?
请教@CatchAndLog为什么是提供service级别的logging和exception处理,@CatchAndLog作为Controller的切面不是更合理吗?
@Pointcut("@within(CatchAndLog) && execution(public * *(..))")
public void pointcut() {
}
这个切面定义没限制在那一层是使用,Controller,service,任何一层跨bean调用都可以使用吧。