This section provides an overview of what spring-mvc is, and why a developer might want to use it.
It should also mention any large subjects within spring-mvc, and link out to the related topics. Since the Documentation for spring-mvc is new, you may need to create initial versions of those related topics.
If you are running on an older version of Java (pre 1.7), or are compiling without debug information, then Java will replace the name of the parameter with arg0
, arg1
, etc, which will prevent Spring from being able to match them up with the part names. If that is the case, then you will need to set the name of the part in the @RequestPart
annotation, as documented in Parameters.
In Spring MVC it is possible to validate form fields using Bean Validation API (JSR 303 for Bean Vaidation 1.0 and JSR 349 for Bean Validation 1.1) that is used to define validation constraints of the JavaBean object.
Hibernate Validator is Bean Validation API reference implementation. Hibernate Validator offers additional value on top of the features required by Bean Validation. For example, a programmatic constraint configuration API as well as an annotation processor which plugs into the build process and raises compilation errors whenever constraint annotations are incorrectly used.
@ContrllerAdvice