事件
升级了mybatis-plus版本,导致以前按照@EnumValue方式的枚举,查询全部报错,由于我pg库的数据类型是numeric,错误提示为numeric can not from integer xxxxx
处理过程
(1)参考https://github.com/baomidou/mybatis-plus/issues/5015中的解决方案,升级了durid版本为1.2.9,且将pg库numeric类型改为int4(瀚高的话改为integer)
(2)类型转换错误不再报了,这时候报错
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: net.sf.jsqlparser.statement.select.PlainSelect.getGroupBy()Lnet/sf/jsqlparser/statement/select/GroupByElement;
参考 https://blog.csdn.net/weixin_46247788/article/details/117364612 文章,修改了jsqlparser的版本为5.2.0,且配置了MybatisPlusInterceptor分页拦截器,至此,问题解决
总结
1.升级mybatis-plus,相应升级durid版本
2.升级后处理依赖冲突病修改数据库的数据类型