nested exception is org.apache.ibatis.exceptions.PersistenceException

nested exception is org.apache.ibatis.exceptions.PersistenceException

报错信息

"nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
### The error may exist in file [D:\\synda\\yyy-app\\api-app\\synda-oauth\\target\\classes\\mapper\\AuthRoleMapper.xml]
### The error may involve com.tengyun.oauth.mapper.AuthRoleMapper.getRole
### The error occurred while handling results
### SQL: SELECT r.id,r.name,r.role_code AS roleCode,r.data_auth AS dataAuth,r.state,r.pid FROM auth_user_role ur         LEFT JOIN auth_role r ON r.id=ur.role_id         WHERE ur.user_id=?         GROUP BY r.id ORDER BY r.data_auth
### Cause: java.lang.IndexOutOfBoundsException: Index: 6, Size: 6"

解决思路
报错内容说 你的 mapper.xml 文件中的某个查询有错,
仔细看你的 sql、映射规则、代码是否有错,
那么请在你在返回的实体类中加入一个空的构造方法,因为我们的实体类里面加了一个有参构造函数,空的构造函数被覆盖,mybatist-plus中 的 resultType=“com.tengyun.oauth.entity.AuthRole”,去调用了我们空的构造函数,结果没有,所以。。。。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值