mybatis
Ken_1115
这个作者很懒,什么都没留下…
展开
-
Caused by: java.lang.IllegalStateException: No typehandler found for property xxx
1、报错信息Caused by: java.lang.IllegalStateException: No typehandler found for property xxx2、原因在相应的xml里的resultMap标签里的result标签里的property属性的值没有在实体类里找到,即property的值没有和实体类的属性名相对应,原因可能是你写错了。3、解决办法进入相应的xml文件里,把该报错的值与实体类的属性对照,看是否写错了,如果写错则改成实体类有的属性。...原创 2022-02-12 19:09:15 · 13975 阅读 · 2 评论 -
mybatis-plus报错:Invalid bound statement (not found): com.xxx.xxx.mapper.xxxMapper.xxById
1、报错信息Invalid bound statement (not found): com.xxx.xxx.mapper.xxxMapper.xxById2、原因想要使用mybatis-plus自带的的xxById方法,必须在相应的实体类里面的与数据库表的主键相映射的属性上面加上@TableId来标识该属性为主键,才能使用mybatis-plus的xxById方法3、解决办法在相应的属性上面加上@TableId来标识该属性为主键例:...原创 2021-12-10 09:39:25 · 1110 阅读 · 0 评论 -
Invalid bound statement (not found): com.xxx.xxx.mapper.xxxMapper.xxx
1、报错信息Invalid bound statement (not found): com.xxx.xxx.mapper.xxxMapper.xxx2、原因忘记在application.yaml里面写上mapper-locations: classpath:mappers/*.xml3、解决办法在application.yaml里面或application.properties里面写上mapper-locations: classpath:mappers/*.xml例:(.原创 2021-12-09 13:01:26 · 150 阅读 · 0 评论 -
There is no setter for property named ‘xxx‘ in ‘class com.xxx.xxx.xxx.xxx‘
1、报错信息Caused by: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'roleId' in 'class com.ken.shoopingboot.bean.Staff'2、不懂英文的可以用百度翻译、有道翻译、QQ在线翻译(快捷键Ctrl+Alt+O)等工具帮助翻译3、原因从数据库里查询出字段名为roleId的数据,但名为staff的实..原创 2021-12-02 18:18:57 · 5236 阅读 · 0 评论 -
Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘‘.Cause: java.lang.Class
1、报错信息Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [D:\idea_work\shooping-boot\target\classes\mappers\GoodsMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving cla原创 2021-11-25 11:12:12 · 1565 阅读 · 0 评论