当前位置:网站首页>Could not set property ‘id‘ of ‘class XX‘ with value ‘XX‘ argument type mismatch 解决办法
Could not set property ‘id‘ of ‘class XX‘ with value ‘XX‘ argument type mismatch 解决办法
2022-07-05 13:17:00 【玲珑·】
我是用的是:
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
解决办法:
在do类的id字段上加 @TableId 注解设置type = IdType.AUTO来指定id自增长,问题解决。
边栏推荐
- CAN和CAN FD
- RHCSA9
- Talk about seven ways to realize asynchronous programming
- Overflow toolbar control in SAP ui5 view
- Association modeling method in SAP segw transaction code
- 精彩速递|腾讯云数据库6月刊
- 【Hot100】33. Search rotation sort array
- Halcon template matching actual code (I)
- About the single step debugging of whether SAP ui5 floating footer is displayed or not and the benefits of using SAP ui5
- [daily question] 1200 Minimum absolute difference
猜你喜欢
leetcode:221. 最大正方形【dp状态转移的精髓】
Cf:a. the third three number problem
STM32 and motor development (from architecture diagram to documentation)
[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel
Detailed explanation of navigation component of openharmony application development
逆波兰表达式
Principle and performance analysis of lepton lossless compression
Lb10s-asemi rectifier bridge lb10s
Write API documents first or code first?
PyCharm安装第三方库图解
随机推荐
Introduction aux contrôles de la page dynamique SAP ui5
Write macro with word
【每日一题】1200. 最小绝对差
山东大学暑期实训一20220620
Concurrent performance test of SAP Spartacus with JMeter
RHCSA8
It's too convenient. You can complete the code release and approval by nailing it!
聊聊异步编程的 7 种实现方式
[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel
蜀天梦图×微言科技丨达梦图数据库朋友圈+1
go map
碎片化知识管理工具Memos
Principle and performance analysis of lepton lossless compression
逆波兰表达式
个人组件 - 消息提示
【Hot100】34. 在排序数组中查找元素的第一个和最后一个位置
国际自动机工程师学会(SAE International)战略投资几何伙伴
程序员成长第八篇:做好测试工作
A specific example of ABAP type and EDM type mapping in SAP segw transaction code
Reverse Polish notation