关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

attempted to return null from a method with a primitive return type

发布时间:2023-06-30 22:28:58

 问题:springboot+mybatisplus 项目,查询的时候报:

attempted to return null from a method with a primitive return type。

问题分析:后台sql未查询出数据,导致返回的内容与接口中的入参类型不一致,报错。

解决方案:修改相应接口的返回类型为包装类。

mybatis的查询无结果时的返回值报错问题_mybatis进行遍历 参数没有值就报错_知凡的博客-CSDN博客



/template/Home/leiyu/PC/Static