iartisan-admin-template.0.0.1.source-code.mybatis-config.xml Maven / Gradle / Ivy
The newest version!
<?xml version="1.0" encoding="utf-8"?> <!-- Copyright 2015-2016 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <!--设置mybatis日志类型--> <settings> <setting name="logImpl" value="LOG4J2"/> <!--配置的缓存的全局开关。--> <setting name="cacheEnabled" value="true"/> <!--延迟加载的全局开关。当开启时,所有关联对象都会延迟加载。 特定关联关系中可通过设置fetchType属性来覆盖该项的开关状态。--> <setting name="lazyLoadingEnabled" value="true"/> <!--当没有为参数提供特定的 JDBC 类型时,为空值指定 JDBC 类型。 某些驱动需要指定列的 JDBC 类型,多数情况直接用一般类型即可,比如 NULL、VARCHAR 或 OTHER。--> <setting name="jdbcTypeForNull" value="NULL"/> <setting name="mapUnderscoreToCamelCase" value="true" /> </settings> <plugins> <plugin interceptor="com.baomidou.mybatisplus.plugins.PaginationInterceptor"></plugin> <!-- 性能拦截器,兼打印sql,不建议生产环境配置--> <plugin interceptor="com.baomidou.mybatisplus.plugins.PerformanceInterceptor"></plugin> </plugins> </configuration>