/**
* 配置mp的分页插件(拦截)
*/
@Configuration
public class MybatisPlusConfig {
@Bean
public MybatisPlusInterceptor mpInterceptor() {
MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
//乐观锁
mybatisPlusInterceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
return mybatisPlusInterceptor;
}
}
标签:拦截器,MybatisPlus,addInnerInterceptor,配置,MybatisPlusInterceptor,mybatisPlusInterce
From: https://www.cnblogs.com/liu-jin/p/17490018.html