1 < Validator= "Validator"/>
When using SPRINGMVC integrated hibernate-validator to do form data validation (page labels use spring's form-related tags), do not know whether due to version reasons or other reasons, you need to put the above configuration on the front , Data validation Comments (for example, @size, @email, and so on) will take effect and the error binding class will receive the error message.
Also, say the difference between Spring-servlet.xml and Applicationcontext.xml in SPRINGMVC:
1:spring-servlet.xml is to read and load the configuration in Dispatcherservlet startup, Applicationcontext.xml is loaded by Contextloaderlistener when the server is started;
2: When the Dispatcherservlet does not use SPRINGMVC to do the control layer (such as with Struts2), Applicationcontext.xml can be used to configure all spring-related things alone; When used together there are some specifications, spring-servlet.xml it is best to load the beans that contain the Web components, such as controllers, view resolvers, and processor mappings, and contextloaderlistener to load other beans in the app, which are typically the middle tier and data-tier components that drive the backend of the application.
Considerations for SPRINGMVC Configuration Validator