mybatis-config.xml
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!-- 全局参数设置 -->
<settings>
<!-- 开启驼峰命名转换 -->
<setting name="mapUnderscoreToCamelCase" value="true"/>
<!-- 开启延迟加载 -->
<setting name="lazyLoadingEnabled" value="true"/>
<!-- 按需加载 -->
<setting name="aggressiveLazyLoading" value="false"/>
<!-- 允许在嵌套语句中使用分页 -->
<setting name="safeRowBoundsEnabled" value="true"/>
<!-- 允许在嵌套语句中使用结果处理器 -->
<setting name="safeResultHandlerEnabled" value="true"/>
<!-- 是否开启自动驼峰命名规则映射 -->
<setting name="mapUnderscoreToCamelCase" value="true"/>
<!-- 本地缓存机制 -->
<setting name="localCacheScope" value="SESSION"/>
<!-- 当没有为参数提供特定的JDBC类型时,为空值指定JDBC类型 -->
<setting name="jdbcTypeForNull" value="OTHER"/>
<!-- 指定哪个对象的方法触发一次延迟加载 -->
<setting name="lazyLoadTriggerMethods" value="equals,clone,hashCode,toString"/>
</settings>
<!-- 类型别名 -->
<typeAliases>
<package name="com.apple.erp.entity"/>
<package name="com.apple.erp.dto"/>
<package name="com.apple.erp.vo"/>
</typeAliases>
<!-- 插件配置 -->
<plugins>
<!-- 分页插件 -->
<plugin interceptor="com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor">
<property name="sqlParser" value="com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize"/>
</plugin>
</plugins>
</configuration>