欢迎使用CSDN-markdown编辑器

来源:互联网 发布:谭铁牛 人工智能 编辑:程序博客网 时间:2024/06/07 15:10

Spring boot使用@Select注解报错

2017-12-14 17:52:03.129 DEBUG 5148 — [nio-8180-exec-2] c.m.p.mapper.ext.PriceExt.queryById : ==> Parameters:
2017-12-14 17:52:03.176 ERROR 5148 — [nio-8180-exec-2] o.s.boot.web.support.ErrorPageFilter : Forwarding to error page from request [/admin/price/updatePage/1] due to exception [Mapper method ‘com.meadding.pkback.mapper.ext.PriceExt.queryById’ has an unsupported return type: class com.meadding.pkback.entity.PriceEntity]

org.apache.ibatis.binding.BindingException: Mapper method ‘com.meadding.pkback.mapper.ext.PriceExt.queryById’ has an unsupported return type: class com.meadding.pkback.entity.PriceEntity
at org.apache.ibatis.binding.MapperMethod.rowCountResult(MapperMethod.java:109)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
at com.sun.proxy.$Proxy110.queryById(Unknown Source)

这里是说这个查询的返回值不能为PriceEntity。仔细检查发现,由于sql太多将这个查询的@Select写成了@Update。

原创粉丝点击