use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project RuoYi-Cloud-Plus by JavaLionLi.
the class MybatisPlusConfiguration method paginationInnerInterceptor.
/**
* 分页插件,自动识别数据库类型
*/
public PaginationInnerInterceptor paginationInnerInterceptor() {
PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
// 设置最大单页限制数量,默认 500 条,-1 不受限制
paginationInnerInterceptor.setMaxLimit(-1L);
// 分页合理化
paginationInnerInterceptor.setOverflow(true);
return paginationInnerInterceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project Hospital_BackEnd by ZJU-SE-2022-G.
the class MyBatisPlusConfig method mybatisPlusInterceptor.
/**
* 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false
* 避免缓存出现问题(该属性会在旧插件移除后一同移除)
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
return interceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project PornTube by PuZhiweizuishuai.
the class MybatisPlusConfig method mybatisPlusInterceptor.
/**
* 引入分页插件
*/
// @Bean
// public PaginationInterceptor paginationInterceptor() {
// PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
// paginationInterceptor.setOverflow(true);
// // 每页最大 100 条
// paginationInterceptor.setLimit(100);
// return paginationInterceptor;
// }
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
paginationInnerInterceptor.setMaxLimit(50L);
paginationInnerInterceptor.setOverflow(true);
MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
mybatisPlusInterceptor.addInnerInterceptor(paginationInnerInterceptor);
return mybatisPlusInterceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project tumo-boot by Tumo-Team.
the class MybatisPlusConfig method mybatisPlusInterceptor.
/**
* 分页插件
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project RG by ADrWondertainment.
the class MybatisPlusConfig method mybatisPlusInterceptor.
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
Aggregations