IllegalArgumentException:argument type mismatch
生活随笔
收集整理的這篇文章主要介紹了
IllegalArgumentException:argument type mismatch
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Exception
nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'id' of 'class com.wzq.test.demo.entity.Fee' with value '1211518556674199553'Cause:java.lang.IllegalArgumentException: argument type mismatch場景:
添加不傳ID使用數(shù)據(jù)庫中的自增。提示類型轉(zhuǎn)換錯誤,Long轉(zhuǎn)換Integer錯誤,原因ID初始化值過大轉(zhuǎn)化成Integer錯誤。解決:
設(shè)置ID的初始化值:ALTER TABLE TABLENAME AUTO_INCREMENT=1; @TableId(value = "id", type = IdType.AUTO) private Integer id;總結(jié)
以上是生活随笔為你收集整理的IllegalArgumentException:argument type mismatch的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 第一百五十二期:白话Entity Fra
- 下一篇: JEECG登陆全过程