原文:java.lang.ClassCastException: java.util.ArrayList cannot be cast to com.github.pagehelper.Page pagehelper报错无法类型转化。

报错信息: 代码: 造成异常原因是代码红色部分,因为pagehelper在设置PageHelper.startPage pageNum, pageSize 后到使用Page lt TbItemCat gt page Page lt TbItemCat gt itemCatMapper.selectByExample example 在这两段代码之前都不能都再进行任何查询不然就会造成类型转化异常。 ...

2019-06-09 15:43 1 2374 推荐指数:

查看详情

java.lang.ClassNotFoundException: com.github.pagehelper.Page

主要原因是使用PageHelper在【服务层】进行分页查询时返回的结果是一个Page对象,在服务发布于获取的序列化与反序列化中会去找Page,然而Page对象继承ArrayList,在最终接收时这个返回对象时,List并没有报错,但是在【引用服务的web层】并没有PageHelper ...

Wed Nov 13 06:18:00 CST 2019 0 1007
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM