新建配置文件
这里起名为: 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>
<mappers>
<mapper resource="mapper/UserMapper.xml"/>
</mappers>
</configuration>
方式二: 包引入(推荐使用)
<configuration>
<mappers>
<package name="com.mybatis.demo.mapper"/>
</mappers>
</configuration>
方式三: 接口引入
待更新
版权属于:乐心湖's Blog
本文链接:https://xn2001.com/archives/359.html
声明:博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!