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”,去调用了我们空的构造函数,结果没有,所以。。。。🆗今天就到这。
|