资讯

展开

Mybatis-Plus-分页配置类

作者:快盘下载 人气:36
package com.czxy.zx.config;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springFramework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
;Configuration
public class MybatisConfig {
;Bean
public MybatisPlusInterceptor mybatisPlusInterceptor(){
MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
mybatisPlusInterceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
return mybatisPlusInterceptor;
}
}

加载全部内容

相关教程
猜你喜欢
用户评论
快盘暂不提供评论功能!