请求500失败-No primary or single unique constructor found for interface xxx

请求500失败-No primary or single unique constructor found for interface xxx_第1张图片

请求500失败-No primary or single unique constructor found for interface xxx_第2张图片

错误:No primary or single unique constructor found for interface java.util.List(没有为List接口找到主要的或唯一的构造函数)

原因:请求的参数没有匹配上处理函数的参数

请求500失败-No primary or single unique constructor found for interface xxx_第3张图片

解决:为List参数添加@RequestParam("strList")指定参数名称即可

附加:本接口为测试异常接口,一般多个参数会封装为一个入参VO对象,使用JSON格式解析传入对象

你可能感兴趣的:(异常问题,java)