
MyBatis
文章平均质量分 52
码农致富
喜欢的朋友可以关注下订阅号:「码农致富」
展开
-
MyBatis-Generato代码生成器取消生成xxxxKey实体类
MyBatis-Generato在生成代码是如果生成了两个实体类,多了一个xxxKey的类,这个时候只需要在generator-configuration.xml中的<context id="default" targetRuntime="MyBatis3" defaultModelType="flat">加入:defaultModelType="flat"就行了...原创 2020-05-21 18:25:10 · 1619 阅读 · 0 评论 -
Mybatis报错: org.apache.ibatis.exceptions.PersistenceException
一、问题描述写好配置文件用JUnit进行测试,一运行就报错:org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating原创 2016-12-18 12:08:18 · 15855 阅读 · 0 评论 -
mybatis错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
一、问题描述运行项目,访问Controller提示错误如下:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.fendo.plus.core.modules.sys.service.UserService.selectById at org.apache.ibatis.原创 2018-01-14 11:12:15 · 13640 阅读 · 0 评论 -
Mybatis使用IN语句查询
一、简介在SQL语法中如果我们想使用in的话直接可以像如下一样使用:select * from HealthCoupon where useType in ( '4' , '3' )但是如果在MyBatis中的使用in的话,像如下去做的话,肯定会报错: Map<String, Object> selectByUserId(@Param("useType") String useT...原创 2018-03-23 16:45:03 · 371907 阅读 · 24 评论