我是用的是:

idea 2018 mysql 5.5 mybatis-plus

报错:

注意加粗部分

2019-11-16 16:53:29.651 ERROR 24132 — [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property ‘id’ of ‘class com.item.DO.ClassRoomDo’ with value ‘1195625928345116673’ Cause: java.lang.IllegalArgumentException: argument type mismatch] with root cause

错误分析:

错误提示为没有设置 id 属性 id自增长没问题 那么可能是往数据库插的do类mybatis-plus没有为其设置自增的id

Could not set property 'id' of 'class XX' with value 'XX' argument type mismatch 解决办法

解决办法:

在do类的id字段上加 @TableId 注解设置type = IdType.AUTO来指定id自增长,问题解决。
Could not set property 'id' of 'class XX' with value 'XX' argument type mismatch 解决办法

相关文章:

  • 2022-01-07
  • 2022-12-23
  • 2021-08-13
  • 2021-04-29
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
相关资源
相似解决方案