@Configuration
public class MybatisPlusConfig {
    /**
     * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除)
     */

    @Bean
    public MybatisPlusInterceptor paginationInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        // 指定数据库方言为 MYSQL
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return interceptor;
    }
}

小生听雨园此处内容已经被作者隐藏,请输入验证码查看内容
验证码:
请关注本站微信公众号,回复“验证码”,获取验证码。在微信里搜索“小生听雨园”或者“manners_maketh_man__”或者微信扫描右侧二维码都可以关注本站微信公众号。

站点统计

  • 文章总数:307 篇
  • 分类总数:19 个
  • 标签总数:189 个
  • 运行天数:923 天
  • 访问总数:533247 人次
ICP备案号: 辽ICP备20003309号