使用AOP的@Around后无返回值的解决

ProceedingJoinPoint对象的proceed会执行被切面环绕的方法,需要将切面类中@Around方法的返回对象设置为与代理方法一致。
如下

	@Around("point_update()")
	public Object update(ProceedingJoinPoint jp) throws Throwable{
    
    
	 ...
	 Object result = jp.proceed();
	 ...
	 return result;
	}

由此可以引出一个问题:AOP的执行过程

猜你喜欢

转载自blog.csdn.net/weixin_44225096/article/details/127211220