如何解决mybatis-plus 版本不兼容问题
导读:本文共780.5字符,通常情况下阅读需要3分钟。同时您也可以点击右侧朗读,来听本文内容。按键盘←(左) →(右) 方向键可以翻页。
摘要: mybatis-plus 版本不兼容问题1,mybatis-plus 版本中存在一个问题。2,mybatis-plus-extension 版本为v3.2.1.1-SNAPSHOT 以上版本时使用其PaginationInterceptor分页插件时。3,mybatis-plus-core 版本也需要升级到v3.2.1.1-SNAPSHOT以上。4,因为在Pag... ...
目录
(为您整理了一些要点),点击可以直达。mybatis-plus 版本不兼容问题
1,mybatis-plus 版本中存在一个问题。
2,mybatis-plus-extension 版本为v3.2.1.1-SNAPSHOT 以上版本时使用其PaginationInterceptor分页插件时。
3,mybatis-plus-core 版本也需要升级到v3.2.1.1-SNAPSHOT以上。
4,因为在PaginationInterceptor类中
此位置使用了mybatis-plus-core包中toolkit/StringUtils工具类中的isNotBlank(),但是低版本中缺乏isNotBlank()方法。
5,会造成使用PaginationInterceptor进行分页时报如下异常:
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotBlank(Ljava/lang/CharSequence;)Z
所以在使用PaginationInterceptor分页插件时需要将pom版本更新至v3.2.1.1-SNAPSHOT版本以上
mybatis-plus-core v3.2.1.1-SNAPSHOT
mybatis-plus-extension v3.2.1.1-SNAPSHO
</div> <div class="zixun-tj-product adv-bottom"></div> </div> </div> <div class="prve-next-news">
如何解决mybatis-plus 版本不兼容问题的详细内容,希望对您有所帮助,信息来源于网络。