mybatisConfigure.xml 1.4 KB

12345678910111213141516171819202122232425
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE configuration
  3. PUBLIC "-//ibatis.apache.org//DTD Config 3.0//EN"
  4. "http://ibatis.apache.org/dtd/ibatis-3-config.dtd">
  5. <configuration>
  6. <!-- 本次修改cacheEnabled和lazyLoadingEnabled为false为了解决多线程并发请求带事务操作时,获取连接对象未及时加载导致报空 -->
  7. <settings>
  8. <!-- 这个配置使全局的映射器启用或禁用 缓存 -->
  9. <setting name="cacheEnabled" value="false" />
  10. <!-- 全局启用或禁用延迟加载。当禁用时, 所有关联对象都会即时加载 -->
  11. <setting name="lazyLoadingEnabled" value="false" />
  12. <!-- 当启用时, 有延迟加载属性的对象在被 调用时将会完全加载任意属性。否则, 每种属性将会按需要加载 -->
  13. <setting name="aggressiveLazyLoading" value="false" />
  14. </settings>
  15. <plugins>
  16. <plugin interceptor="com.startup.minpay.frame.jdbc.interceptor.MINResultSetInterceptor" />
  17. <!-- <plugin interceptor="com.startup.minpay.frame.jdbc.interceptor.MINStatementInterceptor" /> -->
  18. <plugin interceptor="com.minpay.db.StatementInterceptor" />
  19. <!--<plugin interceptor="com.github.pagehelper.PageInterceptor">
  20. &lt;!&ndash; 分页参数合理化, 当页码数 < 0 时, 显示第一页. 当页码数 > 总页码数时, 显示最后一页 &ndash;&gt;
  21. <property name="reasonable" value="true"/>
  22. </plugin>-->
  23. <plugin interceptor="com.minpay.db.PageInterceptors" />
  24. </plugins>
  25. </configuration>