随笔分类 - Mybatis
摘要:org.apache.ibatis.binding.MapperMethod中execute方法...} else if (method.returnsMap()) { result = executeForMap(sqlSession, args);} else {... private ...
阅读全文
摘要:相关类:org.apache.ibatis.executor.CachingExecutor相关代码: public List query(MappedStatement ms, Object parameterObject, RowBounds rowBounds, ResultHandler...
阅读全文
摘要:【可以拦截的类】Executor、ParameterHandler、ResultSetHandler、StatementHandler【注意事项】通过代理实现,假如执行方法时实例已经不是代理,将不能拦截。比如要拦截的类自己调用的方法。 @Override public Object invoke...
阅读全文
摘要:单个参数时在test条件中不能用参数名来引用,可以使用_parameter
阅读全文
摘要:Mapper中的方法执行时会构造为org.apache.ibatis.binding.MapperMethod$MethodSignature对象,从该类源码中可以了解如何使用Mapper方法。【支持的特殊参数类型】RowBounds、ResultHandler、普通参数(作为sql执行时使用的变量...
阅读全文
摘要:1、查询:数据库中存储的应为枚举类的某一个value。如:public enum ValueType { BOOL("布尔"), DIGITAL("数字"), FORMULA("公式"), STRING("字符串"), DATE("日期"); private String type; private ValueType(String type) { this.type = type; } @Override public String toString() { return type; }}数据
阅读全文
摘要:整合spring和mybatis的时候出错:Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException加载applicationContext.xml...
阅读全文

浙公网安备 33010602011771号