当前位置:网站首页>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自增长,问题解决。
边栏推荐
- "Baidu Cup" CTF competition in September, web:sql
- leetcode:221. 最大正方形【dp状态转移的精髓】
- 解决uni-app配置页面、tabBar无效问题
- A specific example of ABAP type and EDM type mapping in SAP segw transaction code
- 946. Verify stack sequence
- LB10S-ASEMI整流桥LB10S
- “百度杯”CTF比赛 九月场,Web:Upload
- Notion 类笔记软件如何选择?Notion 、FlowUs 、Wolai 对比评测
- mysql econnreset_ Nodejs socket error handling error: read econnreset
- Go array and slice
猜你喜欢

Leetcode20. Valid parentheses

碎片化知识管理工具Memos

The Research Report "2022 RPA supplier strength matrix analysis of China's banking industry" was officially launched

DataPipeline双料入选中国信通院2022数智化图谱、数据库发展报告

About the single step debugging of whether SAP ui5 floating footer is displayed or not and the benefits of using SAP ui5

山东大学暑期实训一20220620

RHCSA10

946. Verify stack sequence

CAN和CAN FD

A specific example of ABAP type and EDM type mapping in SAP segw transaction code
随机推荐
Rocky basic command 3
Cf:a. the third three number problem
Talk about seven ways to realize asynchronous programming
Flutter InkWell & Ink组件
Natural language processing from Xiaobai to proficient (4): using machine learning to classify Chinese email content
先写API文档还是先写代码?
Clock cycle
A specific example of ABAP type and EDM type mapping in SAP segw transaction code
时钟周期
Put functions in modules
《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动
946. Verify stack sequence
mysql econnreset_ Nodejs socket error handling error: read econnreset
Sorry, we can't open xxxxx Docx, because there is a problem with the content (repackaging problem)
将函数放在模块中
一文详解ASCII码,Unicode与utf-8
uni-app开发语音识别app,讲究的就是简单快速。
【Hot100】33. Search rotation sort array
精彩速递|腾讯云数据库6月刊
Simple page request and parsing cases