pom.xml
<dependency>
? ? <groupId>mysql</groupId>
? ? <artifactId>mysql-connector-java</artifactId>
? ? <!-- 要加上版本限制省古,父工程默認(rèn)是8的版本 -->
? ? <version>5.1.48</version>
? ? <scope>runtime</scope>
</dependency>
<!--? mybatis plus-->
<dependency>
? ? <groupId>com.baomidou</groupId>
? ? <artifactId>mybatis-plus-boot-starter</artifactId>
? ? <version>3.2.0</version>
</dependency>
config/MyBatisPlusConfig.java
@Configuration
@MapperScan("net.wanho.mapper")
public class MyBatisPlusConfig {
? ? /**
? ? * mybatis-plus分頁插件
? ? */
? ? @Bean
? ? public PaginationInterceptor paginationInterceptor() {
? ? ? ? PaginationInterceptor page = new PaginationInterceptor();
? ? ? ? page.setDialectType("mysql");
? ? ? ? return page;
? ? }
}