use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project ddd-framework by ken-xue.
the class InfrastructureConfig method mybatisPlusInterceptor.
/**
* mbp分页
* @return
*/
@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 RuoYi-Vue-Plus by JavaLionLi.
the class MybatisPlusConfig 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 XHuiCloud by sindaZeng.
the class XHuiMybatisPlusConfig method mybatisPlusInterceptor.
/**
* 数据处理
*/
/**
* mybatis plus 拦截器配置
* @return
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor(XHuiTenantHandler xHuiTenantHandler) {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 多租户支持
TenantLineInnerInterceptor tenantLineInnerInterceptor = new TenantLineInnerInterceptor();
tenantLineInnerInterceptor.setTenantLineHandler(xHuiTenantHandler);
interceptor.addInnerInterceptor(tenantLineInnerInterceptor);
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
return interceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor in project shopzz by whoiszxl.
the class MyBatisConfig method mybatisPlusInterceptor.
/**
* 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题
*/
@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 shopzz by whoiszxl.
the class MyBatisConfig method mybatisPlusInterceptor.
/**
* 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
Aggregations