1. Introduction
Spring has many advantages, one of which is to isolate view technology from other parts of the MVC framework. For example, using groovy Markup Templates or using thymeleaf in the presence of a JSP is only a configuration problem.
This chapter covers the main view technologies, um, those that can be combined with spring, and provides a concise explanation of how to add new view technologies.
This chapter assumes that you are already familiar with spring 4 Official document Learning (11) The Resolving views analytic view of the WEB MVC framework-it covers the basics of how views are coupled to the MVC framework.
2, Thymeleaf
Thymeleaf is a very good example: view technology is perfectly embedded in the MVC framework. The integration support is not provided by the spring team, but is provided by the Thymeleaf team.
To configure Thymeleaf for spring, you only need to define a few beans, such as a servletcontexttemplateresolver, a springtemplateengine, A thymeleafviewresolver. See thymeleaf+spring.
3.
Official Documentation Links:
Http://docs.spring.io/spring/docs/current/spring-framework-reference/html/view.html
Spring 4 Official Document Learning (12) View Technology