mybatis 返回null 及 參數說明

'org.mybatis:mybatis:3.2.8'html

  (會與 'org.mybatis:mybatis:3.1.1',com.mybank.tools.dialect.PaginationInterceptor內git

  MetaObject metaStatementHandler = MetaObject.forObject(statementHandler)衝突 ,github

      改成mybatis

    private static final ObjectFactory DEFAULT_OBJECT_FACTORY = new DefaultObjectFactory();
    private static final ObjectWrapperFactory DEFAULT_OBJECT_WRAPPER_FACTORY = new DefaultObjectWrapperFactory(); app

    MetaObject metaStatementHandler = MetaObject.forObject(statementHandler,DEFAULT_OBJECT_FACTORY,DEFAULT_OBJECT_WRAPPER_FACTORY);   spa

)xml

mybatis-config.xml-->htm

<settings>
  <setting name="callSettersOnNulls" value="true" /><3.1.1不存在此設置,3.2.8存在>
</settings>it

參數詳見:io

http://mybatis.github.io/mybatis-3/zh/configuration.html

project:mybank-gateway

相關文章
相關標籤/搜索