mybatis-config.xml 713 B

123456789101112131415
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE configuration
  3. PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-config.dtd">
  5. <configuration>
  6. <settings>
  7. <setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
  8. <setting name="useGeneratedKeys" value="false" /> <!-- 允许 JDBC 支持自动生成主键 -->
  9. <setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
  10. <setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
  11. <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
  12. </settings>
  13. </configuration>