Could not instantiate bean class [java.util.List]: Specified class is an interface

来源:互联网 发布:unix 网络编程 编辑:程序博客网 时间:2024/06/05 10:38

起因:在js中创建了一个用来存储数字的数组;传递到后台的时候用List<Long>接收

var ids=new Array();

ids.push(1);

结果报出错误: Could not instantiate bean class [java.util.List]: Specified class is an interface

解决办法:后台不能用list接收 而是用数组接收;然后在代码中将数组转换为list集合

List<Long> ids=Arrays.asList(idArray);




阅读全文
0 1
原创粉丝点击