Spring 4 Official Document Learning (12) View Technology

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.