如题是一种错误,另一种错误是
No primary or single unique constructor found for interface java.util.List
前端可以这么写:
const delbyBatchRes = await vm.$axios({
method:'post',
url:'product/delByBatch',
contentType: "application/json;charset=utf-8",
data:vm.delProducts
})
注意这里的data不需要JSON.stringify(),
后端这么写
public Integer DelByBatch( @RequestBody List<ProductWithSetterInfo> products)