Null return value from advice does not match primitive return type for

QQ截图20220316193317.jpg

报错原因:我是代码里用了异步线程,AOP做了一层切面处理,底层是通过jdk动态代理实现。

不管是cglib代理还是jdk代理,你的返回值必须是包装类,如下图我返回的是基本类型,所以就会报错。

把int 改成 Integer就可以解决问题了。

你可能感兴趣的:(Null return value from advice does not match primitive return type for)