Home > Back-end >  For SPRINGMVC transmit the address bar and when a parameter corresponding to the background of multi
For SPRINGMVC transmit the address bar and when a parameter corresponding to the background of multi

Time:09-22


Such as the following code
Parameter binding: a wrapper class
@ RequestMapping (value="https://bbs.csdn.net/queryList")
Public String queryList (Model Model, Fruit Fruit) {
System. The out. Println (" name: "+ fruit. GetName ());
}
Url:
http://localhost:8080/SpringMVC_test/queryList.action? name=% E5 A7 E6 A7 8 d % % % % % BD
Output:
Name: oh
name is Fruit wrapper class attribute name, this type will be for SpringMVC processor adapter parsing, will create a specific entity class, and the relevant attribute values through the set method is bound to the wrapper classes, so successful,

Questions as follows:

when there is more than one entity class this property has a name, for SpringMVC processor adapter how to parse?

CodePudding user response:

Throws an exception: it mean a XXX is duplicate,
  • Related