use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project sakura-boot by yanjingfan.
the class MybatisPlusConfig method mybatisPlusInterceptor.
/**
* 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除)
*/
@Conditional(ConditionOnMissingTenantProperty.class)
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 默认为Mysql
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project citrus by Yiuman.
the class SystemDefaultBeanConfiguration method paginationInterceptor.
@Bean
@ConditionalOnMissingBean(PaginationInnerInterceptor.class)
public PaginationInnerInterceptor paginationInterceptor() {
PaginationInnerInterceptor paginationInterceptor = new PaginationInnerInterceptor();
// 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false
paginationInterceptor.setOverflow(false);
// 设置最大单页限制数量,默认 500 条,-1 不受限制
paginationInterceptor.setMaxLimit(500L);
return paginationInterceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project boot-admin by hb0730.
the class MybatisPlusConfig method paginationInnerInterceptor.
private InnerInterceptor paginationInnerInterceptor() {
PaginationInnerInterceptor interceptor = new PaginationInnerInterceptor();
interceptor.setDbType(DbType.MYSQL);
interceptor.setOverflow(true);
return interceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project Taier by DTStack.
the class MybatisConfig 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 learn-mall-demo by AhogeK.
the class MyBatisPlusConfig method mybatisPlusInterceptor.
/**
* Mybatis 分页配置
*
* @return MP 拦截器
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
Aggregations