1.导入依赖
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
2.配置
mybatis:
##全局配置文件的位置
config-location: classpath: mybatis/mybatis-config.xml
##mapper映射文件
mapper-locations: classpath: mapper/*.xml
3.包扫描
@MapperScan