错误示范:
当有多个@RequestParam并且list<对象>里面是个对象的时候是会报错的
Resolved [org.springframework.web.method.annotation.MethodArgumentConversionNotSupportedException: Failed to convert value of type ‘java.lang.String’ to required type ‘java.util.List’; nested exception is java.lang.IllegalStateException: Cannot convert value of type ‘java.lang.String’ to required type ‘com.fan.entity.Canojo’: no matching editors or conversion strategy found]
解决方案:
list中泛型是对象,不允许用@RequesParam注解修饰的,换成@@RequestBody
如果list中泛型是基本数据类型包装类是可以运用@RequesParam注解
链接:https://blog.csdn.net/Fanzongshen/article/details/124208709