MyBatis 配置文件
MyBatis 配置文件
记不住上边的跟标签就复制吧!
mybatis-config.xml
<?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="cacheEnable" value="true"/>
</settings>
</configuration>
mapper.xml
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fujie.springcloud.pojo.Dept">
<resultMap type="com.fujie.springcloud.pojo.Dept" id="deptMap">
<id column="dept_id" property="deptId"/>
<result column="dept_name" property="deptName"/>
<result column="dept_resource" property="deptSource"/>
</resultMap>
</mapper>