spring boot 集成 mybatis 文章目录 spring boot 集成 mybatis1、pom 引入 依赖2、启动类中 注解扫描mapper接口3、配置文件中写入xml地址 1、pom 引入 依赖 mybatis-spring-boot-starter 2、启动类中 注解扫描mapper接口 @MapperScan(basePackages = "com.xxx.mapper") 3、配置文件中写入xml地址 mybatis: mapper-locations: classpath:mapper/*.xml mapper-locations: classpath:mapper/*.xml