7th Chapter SPRINGMVC
1, controller, if you want to add the method into the model, only need to use the @modeattribute in front of the corresponding entry parameters
2. Spring MVC creates an implicit model object as a storage container for model data before invoking the method. If the incoming parameter of the processing method is a map or model type (Org.springframework.ui.Model, similar to map, is easier to use than map), SPRINGMVC will pass the application of the implied model to these arguments. This allows the developer to access all the data in the model, as well as add new attribute data to the model.
3, SPRING3.0 has its own independent calibration framework, while supporting the JSR303 standard calibration framework, but it does not provide JSR303 implementation, can contain HibernateValidatorJSR303 implementation jar for SPIRNG use. As follows:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.3.1.Final</version>
</dependency>
Loacalvalidateorfactorybean implements the validator interface of Spirng, and also realizes the validator interface of JSR303. Just define a localvalidatorfactorybean in the spring container. At the same time, the label <mvc:annotation-driven/> provided by spring will be assembled good one localvalidatorfactorybean by default, without us having to declare the bean separately.
"Spring3.0 is so simple"--Study Note 2