Newer
Older
huludao / src / main / java / com / newfiber / api / config / MybatisPlusConfig.java
@新烽开发者 新烽开发者 on 19 Jul 668 bytes init
package com.newfiber.api.config;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.baomidou.mybatisplus.plugins.PaginationInterceptor;

/**
 * Mybatis配置
 * @author hy
 */
@Configuration
@MapperScan("com.newfiber.api.**.dao*")
public class MybatisPlusConfig {
	
    @Bean
    public PaginationInterceptor paginationInterceptor() {
    	PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
    	paginationInterceptor.setLocalPage(true); // 开启 PageHelper 的支持
        return paginationInterceptor;
    }
    
}