06.SpringMVC the parameter binding

A parameter types supported by default

HttpServletRequest 、HttpServletResponse 、HttpSession、java.security.Principal、Locale 、InputStream 、OutputStream 、Reader 、Writer

 

 Two types of parameters supported by default

Model is an interface, a ModelMap an interface, acts to fill the request field data Model

 

 Binding simple parameters

 

 Object assignment

Important: attribute name is consistent with the required form submission pojo attribute name, support cascading attribute, the value of the name attribute pojo property associated object properties.

 

 Array assignment

 

 Collection assignment, generic basic types

 

 Collection assignment, generic object

 

 map collection assignment

 

 restful style

HiddenHttpMethodFilter

form form only support GET and POST, DELETE, and PUT requests for request not supported, Spring3.0 a filter can be added to these requests into a standard method of such supports http GET, POST, PUT and DELETE requests.
Implemented steps of:
adding a filter in web.xml HiddenHttpMethodFilter
added a hidden field in the form: <input name = "_ method " type = "hidden" value = "UPDATE && DELETE">

Guess you like

Origin www.cnblogs.com/deityjian/p/11494983.html