当前位置:网站首页>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自增长,问题解决。
边栏推荐
- Shu tianmeng map × Weiyan technology - Dream map database circle of friends + 1
- 蜀天梦图×微言科技丨达梦图数据库朋友圈+1
- 阿里云SLB负载均衡产品基本概念与购买流程
- [notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel
- Talking about fake demand from takeout order
- 手把手带你入门Apache伪静态的配置
- 数据泄露怎么办?'华生·K'7招消灭安全威胁
- 碎片化知识管理工具Memos
- Although the volume and price fall, why are the structural deposits of commercial banks favored by listed companies?
- go 字符串操作
猜你喜欢

uni-app开发语音识别app,讲究的就是简单快速。

It's too convenient. You can complete the code release and approval by nailing it!
![[深度学习论文笔记]TransBTSV2: Wider Instead of Deeper Transformer for Medical Image Segmentation](/img/70/6de0346df8527af6c88db1ff89947b.png)
[深度学习论文笔记]TransBTSV2: Wider Instead of Deeper Transformer for Medical Image Segmentation

CAN和CAN FD

LB10S-ASEMI整流桥LB10S
![[daily question] 1200 Minimum absolute difference](/img/2f/9214df63f6d5fafa1f7247c4529643.png)
[daily question] 1200 Minimum absolute difference

什么是网络端口

逆波兰表达式

Shandong University Summer Training - 20220620
![[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel](/img/b6/f9da8a36167db10c9a92dabb166c81.png)
[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel
随机推荐
Small case of function transfer parameters
STM32 and motor development (from architecture diagram to documentation)
函数传递参数小案例
CAN和CAN FD
DataPipeline双料入选中国信通院2022数智化图谱、数据库发展报告
今年上半年,通信行业发生了哪些事?
go map
关于 Notion-Like 工具的反思和畅想
go 指针
Shandong University Summer Training - 20220620
mysql econnreset_Nodejs 套接字报错处理 Error: read ECONNRESET
Difference between avc1 and H264
Go array and slice
ASEMI整流桥HD06参数,HD06图片,HD06应用
leetcode:221. 最大正方形【dp状态转移的精髓】
Shuttle INKWELL & ink components
Although the volume and price fall, why are the structural deposits of commercial banks favored by listed companies?
简单上手的页面请求和解析案例
Notion 类笔记软件如何选择?Notion 、FlowUs 、Wolai 对比评测
Laravel document reading notes -mews/captcha use (verification code function)