springMVC的请求方法中处理多个mybatis方法,到某个方法中断了:BindingException:has an unsupported return type
例如:
@ResponseBody
@RequestMapping(value = "toRequestDeleteDome", method = RequestMethod.POST)
public ConverntReturnList deleteSomeHandler(@RequestParam("del_items[]") Integer[] array, @RequestParam("show_page") Integer curPageNum) {
System.out.println(array.toString());
productionDao.toDeleteYourSelction(array);
PageHelper.startPage(curPageNum, 10);
List<Production> list = productionDao.getAllProduction();
int allResultPages = ((Page) list).getPages();
int curResultPage = ((Page) list).getPageNum();
return new ConverntReturnList(curResultPage, allResultPages, list);
}
在运行productionDao.toDeleteYourSelction(array);之后,程序就死了,没有运行下去,报错如下:
mybatis的处理出错:
org.apache.ibatis.binding.BindingException:
Mapper method 'com.dao.ProductionMapper.toDeleteSelection' has an unsupported return type: class [Ljava.lang.Integer;
实际情况:
sql删除没有返回值:
<!--根据选择删除-->
<delete id="toDeleteSelection" parameterType="arraylist">
DELETE FROM ssh_info WHERE ssh_info.ID IN
<foreach collection="array" item="item" open="(" separator="," close=")">#{item}</foreach>
</delete>
但在mapper的dao中却有返回值,这里出错了
Integer[] toDeleteSelection(Integer[] arr);
应该改为:
void toDeleteSelection(Integer[] arr);
· 对象命名为何需要避免'-er'和'-or'后缀
· SQL Server如何跟踪自动统计信息更新?
· AI与.NET技术实操系列:使用Catalyst进行自然语言处理
· 分享一个我遇到过的“量子力学”级别的BUG。
· Linux系列:如何调试 malloc 的底层源码
· JDK 24 发布,新特性解读!
· C# 中比较实用的关键字,基础高频面试题!
· .NET 10 Preview 2 增强了 Blazor 和.NET MAUI
· SQL Server如何跟踪自动统计信息更新?
· windows下测试TCP/UDP端口连通性