![](https://csdnimg.cn/release/download_crawler_static/9773553/bg12.jpg)
Spring Framework Reference Documentation
4.3.7.RELEASE Spring Framework xviii
Handling a file upload in a form ...................................................................... 534
Handling a file upload request from programmatic clients .................................. 535
22.11. Handling exceptions ..................................................................................... 536
HandlerExceptionResolver .............................................................................. 536
@ExceptionHandler ........................................................................................ 536
Handling Standard Spring MVC Exceptions ...................................................... 537
Annotating Business Exceptions With @ResponseStatus .................................. 538
Customizing the Default Servlet Container Error Page ...................................... 538
22.12. Web Security ............................................................................................... 539
22.13. Convention over configuration support ........................................................... 539
The Controller ControllerClassNameHandlerMapping ........................................ 539
The Model ModelMap (ModelAndView) ............................................................ 540
The View - RequestToViewNameTranslator ..................................................... 541
22.14. HTTP caching support .................................................................................. 542
Cache-Control HTTP header ........................................................................... 543
HTTP caching support for static resources ....................................................... 543
Support for the Cache-Control, ETag and Last-Modified response headers in
Controllers ...................................................................................................... 544
Shallow ETag support ..................................................................................... 545
22.15. Code-based Servlet container initialization ..................................................... 546
22.16. Configuring Spring MVC ............................................................................... 547
Enabling the MVC Java Config or the MVC XML Namespace ............................ 548
Customizing the Provided Configuration ........................................................... 549
Conversion and Formatting ............................................................................. 550
Validation ....................................................................................................... 551
Interceptors .................................................................................................... 552
Content Negotiation ........................................................................................ 553
View Controllers ............................................................................................. 554
View Resolvers .............................................................................................. 554
Serving of Resources ..................................................................................... 555
Falling Back On the "Default" Servlet To Serve Resources ................................ 558
Path Matching ................................................................................................ 559
Message Converters ....................................................................................... 560
Advanced Customizations with MVC Java Config ............................................. 561
Advanced Customizations with the MVC Namespace ........................................ 562
23. View technologies ..................................................................................................... 563
23.1. Introduction .................................................................................................... 563
23.2. Thymeleaf ..................................................................................................... 563
23.3. Groovy Markup Templates .............................................................................. 563
Configuration .................................................................................................. 563
Example ......................................................................................................... 564
23.4. Velocity & FreeMarker .................................................................................... 564
Dependencies ................................................................................................ 564
Context configuration ...................................................................................... 564
Creating templates ......................................................................................... 565
Advanced configuration ................................................................................... 565
velocity.properties ................................................................................... 565
FreeMarker ............................................................................................. 566
Bind support and form handling ....................................................................... 566
The bind macros .................................................................................... 566