需要增加以下配置:
@Configuration(proxyBeanMethods = false) public class MybatisAutoConfiguration { /** * 配置PaginationInterceptor,使其分页插件有效 * @return */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); } }
原文:https://www.cnblogs.com/yshyee/p/14387545.html