@EnableTransactionManagement
@Component
public class MybatisPlusConfig {
/**
* 分页查询插件
* @return
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
//当请求的页数大于最大页跳回到首页
paginationInterceptor.setOverflow(true);
return paginationInterceptor;
}
}