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; } }