kotlin mybatis:No constructor found in void matching
来源:互联网 发布:pg dump 导出数据库 编辑:程序博客网 时间:2024/05/21 17:30
记录一次诡异的报错
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: No constructor found in void matching [java.lang.Long, java.lang.Integer, java.lang.String, java.lang.String, java.math.BigDecimal]
按理说都报了没有相应的构造方法,去补上的总可以了吧。百度一下,说是没有无参构造函数。然而,我的领域类是这样写的
data class Book( var id:Long? = 0, var type:Int? = 1, var name:String = "", var des:String = "", var price:BigDecimal= BigDecimal.ZERO, var imageUrls:MutableList<String>?=null)
怎么可能呢?
在仔细看了一下代码后,发现我的mapper有问题。
interface BookMapper { @Select("select * from book where id = #{id}") fun findOne(id:Long) @Select("select * from book") fun finaAll():MutableList<Book>}
findOne没有写返回值。
就是这样,喵!
补上返回值就好了。
阅读全文
0 0
- kotlin mybatis:No constructor found in void matching
- MyBatis - No constructor found
- mybatis--No constructor found
- Mybatis-No constructor found
- Mybatis 报错 No constructor found in xx类
- Mybatis 报错 No constructor found in xx类
- No constructor found错误 mybatis笔记
- MyBatis-Mapper中错误No constructor found...
- 在写Mybatis时遇到的问题:No constructor found in 包名+类名
- akka创建actor时报错:IllegalArgumentException: no matching constructor found on class $iwC$$iwC$$iwC$$iwC$
- no matching symbolic information found
- no matching symbolic information found
- No matching provisioning profiles found
- no matching provisioning profiles found
- No matching provisioning profiles found
- No matching provisioning profiles found
- no matching provisioning profile found
- no matching provisioning profile found
- 把数据库里的大表放到REDIS中(从Mysql将数据快速导入到redis中 )
- Seeds算法(SEEDS: Superpixels Extracted via Energy-Driven Sampling)
- 挑战程序竞赛系列(49):4.2 推理与动态规划算法(2)
- DELETE_FAILED_INTERNAL_ERROR Error while Installing APKs
- Caffe入门以及迁移学习(Fintune)的方法
- kotlin mybatis:No constructor found in void matching
- vue学习笔记5——路由相关配置,引入其他插件等
- 浅谈前端CSS样的编写
- GeoServer基础教程(六):使用GeoServer发布PostGIS表数据
- CSS图片宽度设置百分比 , 高度同宽度相同
- 列表和字典嵌套完成电话簿(增删改查)
- 游标查询,最好控制在1万条以内
- SSH和SSM对比总结
- 回收VMWare虚拟机占用的磁盘空间