当前位置:网站首页>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自增长,问题解决。
边栏推荐
- Asemi rectifier bridge hd06 parameters, hd06 pictures, hd06 applications
- [深度学习论文笔记]使用多模态MR成像分割脑肿瘤的HNF-Netv2
- Hiengine: comparable to the local cloud native memory database engine
- Although the volume and price fall, why are the structural deposits of commercial banks favored by listed companies?
- Can and can FD
- Overflow toolbar control in SAP ui5 view
- SAP ui5 objectpagelayout control usage sharing
- LeetCode20.有效的括号
- Introduction to sap ui5 flexiblecolumnlayout control
- go 字符串操作
猜你喜欢
国际自动机工程师学会(SAE International)战略投资几何伙伴
leetcode:221. 最大正方形【dp状态转移的精髓】
A specific example of ABAP type and EDM type mapping in SAP segw transaction code
Navigation property and entityset usage in SAP segw transaction code
RHCSA10
STM32 and motor development (from architecture diagram to documentation)
【每日一题】1200. 最小绝对差
什么是网络端口
《2022年中國銀行業RPA供應商實力矩陣分析》研究報告正式啟動
潘多拉 IOT 开发板学习(HAL 库)—— 实验7 窗口看门狗实验(学习笔记)
随机推荐
ABAP editor in SAP segw transaction code
Pycharm installation third party library diagram
C# 对象存储
Android本地Sqlite数据库的备份和还原
Fragmented knowledge management tool memos
Sorry, we can't open xxxxx Docx, because there is a problem with the content (repackaging problem)
Introduction to sap ui5 flexiblecolumnlayout control
Shandong University Summer Training - 20220620
leetcode:221. Maximum square [essence of DP state transition]
解决uni-app配置页面、tabBar无效问题
Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications
Halcon template matching actual code (I)
leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
Navigation property and entityset usage in SAP segw transaction code
STM32 and motor development (from architecture diagram to documentation)
程序员成长第八篇:做好测试工作
Simple page request and parsing cases
About the single step debugging of whether SAP ui5 floating footer is displayed or not and the benefits of using SAP ui5
APICloud Studio3 API管理与调试使用教程
聊聊异步编程的 7 种实现方式