Error: Org.springframework.beans.BeanInstantiationException:Could not instantiate Bean class [java.util.List]: Specified Class
This is an error when I use spring MVC, which is passed to the control layer after the foreground encapsulates the IDs of multiple information into a collection, to the parameters that automatically map these IDs to the control layer methods
This parameter is a list type, because spring MVC is not directly mapped to the parameters of the collection type, we need to encapsulate the parameters of this collection type in a class, for example:
ID collection name of the foreground package: IDs,
Methods to map to the control layer:
1 @requestMapping ("/test")2publicvoidthrows exception{ 34// Your code 5 }
Testvo Class (Our encapsulation Class)
1 Public class Testvo {23private List IDs; // receive multiple IDs passed by the foreground, and the property name must be the same as the name of the ID collection passed by the foreground 4 5 // IDs Setter and getter method, this must have, I do not write here 6 7 }
Study can not stop, everyone refueling!
Org.springframework.beans.BeanInstantiationException:Could not instantiate Bean class [java.util.List]: Specified Class