Reference
http://blog.csdn.net/u013067598/article/details/69372309
http://blog.csdn.net/u013686993/article/details/52932079
The final incoming is Extendedmodelmap , it inherits the Modelmap , implements the Model interface,
Modelmap also inherits from HashMap.
Method of the Model interface
Methods of the Modemap class:
Methods of the Extendedmodelmap class:
Visible Extendedmodelmap method and Modelmap are the same, and what has increased, it is estimated that the function is enhanced.
And since Modelmap started to inherit the Haspmap, so many map methods
The model interface defines several methods for adding data to the model.
So the parameter type write Modelmap and model are correct, write map also can use, even can write Extendedmodelmap.
If you just read the data in the model and write the Map type, there is a get method that is enough to lose the Moel interface AddAttribute to add model data.
If you just write data to the model, it is sufficient to write a parameter of type AddAttribute, which can be done without the need of a haspmap get method.
Of course, the actual use of the words who still think so fine, make a modelmap read and write can be done!
Springmvc Controller method Parameters What is the difference between the Modelmap and the model type?