【db】更新mp的分页插件

pull/3/head
fengshuonan 2020-12-17 22:27:26 +08:00
parent 2fc771b0bb
commit 9f0089f15b
1 changed files with 17 additions and 5 deletions

View File

@ -1,11 +1,12 @@
package cn.stylefeng.roses.kernel.db.starter;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import cn.stylefeng.roses.kernel.db.mp.dbid.CustomDatabaseIdProvider;
import cn.stylefeng.roses.kernel.db.mp.fieldfill.CustomMetaObjectHandler;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -16,9 +17,20 @@ import org.springframework.context.annotation.Configuration;
* @date 2020/11/30 22:40
*/
@Configuration
@AutoConfigureAfter(MybatisPlusAutoConfiguration.class)
@AutoConfigureBefore(MybatisPlusAutoConfiguration.class)
public class GunsMyBatisPlusAutoConfiguration {
/**
*
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 使用分页插插件
interceptor.addInnerInterceptor(paginationInterceptor());
return interceptor;
}
/**
*
*