目录 一、Mybatis中XxxMapper.xml文件位置 1、放在resources/mappers目录下 1.1、普通mybatis案例中 1.2、springboot中 2、放在resources/com/xxx自定义接口同名的目录下 3、放在src/main/java/com/xxx/mapper接口相同包下 一、Mybatis中XxxMapper.xml文件位置 1、放在resources/mappers目录下 1.1、普通mybatis案例中 在核心配置文件mybatis-config.xml中设置映射文件位置 <!--引入映射文件,可以通过package或者mapper标签设置--> <mappers> <!--<package name=""/>--> <mapper resource="mappers/UserMapper.xml"