use of com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor in project pig by pig-mesh.
the class MybatisAutoConfiguration method mybatisPlusInterceptor.
/**
* 分页插件, 对于单一数据库类型来说,都建议配置该值,避免每次分页都去抓取数据库类型
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PigPaginationInnerInterceptor());
return interceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor in project Ant-Live by PinTeh.
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.MybatisPlusInterceptor in project waynboot-mall by wayn111.
the class MybatisPlusConfig method mybatisPlusInterceptor.
// 最新版
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
return interceptor;
}
use of com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor in project waynboot-mall by wayn111.
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.MybatisPlusInterceptor in project project by Ahaochan.
the class MyBatisPlusConfig method mybatisPlusInterceptor.
/**
* @see <a href="https://mp.baomidou.com/guide/interceptor.html">插件主体(必看!)(since 3.4.0)</a>
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
List<InnerInterceptor> innerInterceptors = Arrays.asList(// new TenantLineInnerInterceptor(), new DynamicTableNameInnerInterceptor(),
new PaginationInnerInterceptor(), new OptimisticLockerInnerInterceptor(), // update 和 delete 必须要有 where
new BlockAttackInnerInterceptor());
mybatisPlusInterceptor.setInterceptors(innerInterceptors);
return mybatisPlusInterceptor;
}
Aggregations