解决:Request processing failed; nested exception is java.lang.IllegalStateException: No primary or def

北战南征 提交于 2020-03-06 02:59:22

报错信息:java.lang.NoSuchMethodException: java.util.List.()

严重: Servlet.service() for servlet [dispatcherServlet] in context with path [/video_analysis] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: No primary or default constructor found for interface java.util.List] with root cause
java.lang.NoSuchMethodException: java.util.List.()

错误代码:

 public DMLReturnVo updateByIds(@ApiParam(name = "deleteid") List<Integer>  deleteid,@ApiParam(name = "file") @RequestParam(required = false) MultipartFile file,@PathVariable Long id,
                                   FieldArms entity,@RequestParam(required = false) String json, @ApiParam(name = "updatelist")List<Object> updatelist ) throws FareUtilException, DMLReturnException {

解决:List 类型未加@RequestParam(value=“deleteid”,required=true) 注解

 public DMLReturnVo updateByIds(@RequestParam(value="deleteid",required=true) List<Integer>  deleteid,@ApiParam(name = "file") @RequestParam(required = false) MultipartFile file,@PathVariable Long id,
                                   FieldArms entity,@RequestParam(required = false) String json,@RequestParam(value="updatelist",required=true)List<Object> updatelist ) throws FareUtilException, DMLReturnException {

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!