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>
posted @ 2020-09-20 21:52  汪什么来着儿  阅读(95)  评论(0编辑  收藏  举报