首页>代码>基于SpringBoot开发的知识库管理系统的设计与实现>/pb-cms/src/main/java/com/puboot/common/config/MybatisPlusConfig.java
package com.puboot.common.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * spring事务、MybatisPlus分页插件、mybatis包扫描等配置
 *
 * @author LinZhaoguan
 * @version V1.0
 * @date 2019年9月11日
 */
@EnableTransactionManagement
@Configuration
@MapperScan(basePackages = "com.puboot.module.admin.mapper")
public class MybatisPlusConfig {

    /**
     * 分页插件
     */
    @Bean
    public MybatisPlusInterceptor paginationInterceptor() {
        PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
        paginationInnerInterceptor.setMaxLimit(-1L);
        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
        mybatisPlusInterceptor.addInnerInterceptor(paginationInnerInterceptor);
        return mybatisPlusInterceptor;
    }
}
最近下载更多
xiexiaoming05  LV14 前天
liuqi1234  LV1 5月11日
lyosaki88  LV1 3月7日
xgs_wu  LV1 2月18日
lvyga1  LV2 2024年12月18日
xianyu091012  LV5 2024年11月19日
allmy3  LV2 2024年10月30日
微信网友_7044194812350464  LV8 2024年9月13日
255921158  LV5 2024年9月11日
thsgli  LV9 2024年8月21日
最近浏览更多
xiexiaoming05  LV14 前天
潜心小白来到  LV3 6月10日
ES大兵  LV11 6月9日
zt843217  LV2 5月26日
liuqi1234  LV1 5月11日
shuji123 3月28日
暂无贡献等级
未启用 3月22日
暂无贡献等级
赵俊翔 3月19日
暂无贡献等级
baiyuning 3月17日
暂无贡献等级
萍水相逢0708 3月13日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友