You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.6 KiB
49 lines
1.6 KiB
<?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>
|
|
|
|
<properties resource="db.properties"></properties>
|
|
|
|
<settings>
|
|
<!-- 打开延迟加载的开关-->
|
|
|
|
<setting name="lazyLoadingEnabled" value="true"/>
|
|
<setting name="aggressiveLazyLoading" value="true"/>
|
|
|
|
<!--设置日志处理方式 LOG4J和 LOG4J2-->
|
|
<setting name="logImpl" value="LOG4J2"/>
|
|
</settings>
|
|
|
|
<!--设置实体类别名-->
|
|
<typeAliases>
|
|
<!--
|
|
通过包扫描给所有的实体类起别名
|
|
给指定报名下的所有类起别名
|
|
默认每个实体类的别名是首字母小写的类名
|
|
Dept dept
|
|
Emp emp
|
|
-->
|
|
<package name="com.zhangzeyuan.pojo"/>
|
|
</typeAliases>
|
|
|
|
<!--配置数据库链接信息-->
|
|
<environments default="mysql">
|
|
<!--数据源1-->
|
|
<environment id="mysql">
|
|
<transactionManager type="JDBC"/>
|
|
<!--一个数据源-->
|
|
<dataSource type="POOLED">
|
|
<property name="driver" value="${jdbc_driver}"/>
|
|
<property name="url" value="${jdbc_url}"/>
|
|
<property name="username" value="${jdbc_username}"/>
|
|
<property name="password" value="${jdbc_password}"/>
|
|
</dataSource>
|
|
</environment>
|
|
</environments>
|
|
<!--加载映射文件的-->
|
|
<mappers>
|
|
<package name="com.zhangzeyuan.mapper"/>
|
|
</mappers>
|
|
</configuration> |