com.github.pagehelper.PageHelper cannot be cast to org.apache.ibatis.plugin.Interceptor

com.github.pagehelper.PageHelper cannot be cast to org.apache.ibatis.plugin.Interceptor,第1张

com.github.pagehelper.PageHelper cannot be cast to org.apache.ibatis.plugin.Interceptor

使用pagehelper插件时异常
      5.0之后的版本使用com.github.pagehelper.PageInterceptor这个类

            即改为:
        

再次报错:
        Cause: com.github.pagehelper.PageException: java.lang.ClassNotFoundException: mysql

原因:4.0.0以后的版本已经可以自动识别数据库了,所以不需要我们再去指定数据库

注掉

项目成功启动

补充:

用下面的会报错:在系统中发现了多个分页插件,请检查系统配置!

pagehelper-spring-boot-starter

需将pom依赖换成


    com.github.pagehelper
    pagehelper
    5.1.4
 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4014587.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-10-22
下一篇 2022-10-22

发表评论

登录后才能评论

评论列表(0条)

保存