Search in sources :

Example 1 with PigPaginationInnerInterceptor

use of com.pig4cloud.pig.common.mybatis.plugins.PigPaginationInnerInterceptor 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;
}
Also used : PigPaginationInnerInterceptor(com.pig4cloud.pig.common.mybatis.plugins.PigPaginationInnerInterceptor) MybatisPlusInterceptor(com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor) Bean(org.springframework.context.annotation.Bean)

Aggregations

MybatisPlusInterceptor (com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor)1 PigPaginationInnerInterceptor (com.pig4cloud.pig.common.mybatis.plugins.PigPaginationInnerInterceptor)1 Bean (org.springframework.context.annotation.Bean)1