当访问 http://localhost:9100/categoryList 这个链接时报下面的错误​​​​​​​

   第一反应是数组越界,但是仔细检查代码发现没有问题。最后发现是没有加无参构造函数

### Error querying database.  Cause: java.lang.IndexOutOfBoundsException: Index: 10, Size: 10
### The error may exist in com/neutech/vuetree/mapper/CourseCategoryMapper.java (best guess)
### The error may involve com.neutech.vuetree.mapper.CourseCategoryMapper.selectList
### The error occurred while handling results
### SQL: SELECT  id,title,description,mark,status,type,pid,isexpand,create_time,update_time  FROM kss_course_category
### Cause: java.lang.IndexOutOfBoundsException: Index: 10, Size: 10] with root cause

java.lang.IndexOutOfBoundsException: Index: 10, Size: 10

解决办法和原因如下

 没有用lombok的自己手写一个无参构造就行(前提是你已经写了有参构造方法,没写的话默认无参构造) 

Logo

前往低代码交流专区

更多推荐