Spring之AOP奇葩报错:Null return value from advice does not match primitive return type for
来源:互联网 发布:软件运营方案书 编辑:程序博客网 时间:2024/06/05 15:06
1、org.springframework.aop.AopInvocationException:Null return value from advice does not match primitive return type for
这个错就是返回的类型不匹配。
2、解决方法:
我目前的解决方发就是把service层对应的接口返回值改成Object类型;这样就解决了(注意:我为什么改service层的呢!因为我把aop的入口写在service层。)。
为什么是报这错呢主要是:我mapper的接口返回int;service的接口也是返回 int;在controller层向前端返回的是Map<String,Object>;好了到这里就报错了,我也不知道为什么报错。
3、我目前也没有什么好的解决方法。如果那位大神有好的解决方法可以在下面留言。
阅读全文
0 0
- Spring之AOP奇葩报错:Null return value from advice does not match primitive return type for
- aop.AopInvocationException: null return value from advice does not match primitive return type for
- mybatis返回int类型报错 return null from a method with a primitive return type (int).
- 关于attempted to return null from a method with a primitive return type (int).报错解决方案
- attempted to return null from a method with a primitive return type (int).
- mybatis -----attempted to return null from a method with a primitive return type (int)
- MyBatis提示getFundBonus attempted to return null from a method with a primitive return type (double)
- attempted to return null from a method with a primitive return type (int)异常的解决
- Spring MVC:报错No converter found for return value of type
- 【java】Mybatis返回int类型为空时报错 attempted to return null from a method with a primitive return type (int)
- springmvc框架报错java.lang.IllegalArgumentException: No converter found for return value of type: class
- SpringMVC 返回json数据报错IllegalArgumentException: No converter found for return value of type:xxx
- expect match return value
- Spring框架使用 错误:Does the parameter type of the setter match the return type of the getter?
- UrlFilenameViewController does not return View (Spring-MVC)
- 报错:constructors not allowed a return type
- springMVC返回json格式数据报错:No converter found for return value of type: class java.util.HashMap
- springMVC返回json格式数据报错:No converter found for return value of type: class java.util.HashMap
- 如何定位JVM的问题
- iOS UIView、UIImageView旋转产生边界锯齿的完美解决方法
- .net Math.Round方法详解
- Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.hide()' on a null object re
- 分布式 微服务 JAVA语言开发
- Spring之AOP奇葩报错:Null return value from advice does not match primitive return type for
- MyBatis入门(一)
- Springmvc 拦截器的基本配置和使用
- 关于hover的一些问题
- Oracle sql生成md5
- JAVA线程之ReentrantLock源码分析(二)
- 顺序表应用1:多余元素删除之移位算法
- 判断是否是IE浏览器或IE内核浏览器
- Linux压缩解压缩命令對比