Spring Boot Foundation 6-web Application Development-template engine Freemarker

Source: Internet
Author: User
Tags deprecated

Original video reference: Http://www.roncoo.com/course/view/c99516ea604d4053908c1768d6deee3d

A. Spring boot 's Web application development is based on spring MVC

two. Spring Boot is based on spring default, and the following features are added for automatic configuration:

  1. 1. contains the contentnegotiatingviewresolver and beannameviewresolver beans.

  2. 2. support for static resources, including support for Webjars.

  3. 3. Auto-register converter,genericconverter,formatter beans.

  4. 4. support for the httpmessageconverters.

  5. 5. Automatic registration of Messagecoderesolver.

  6. 6. support for static index.html.

  7. 7. support for Custom favicon.

  8. 8. active use of configurablewebbindinginitializer beans

three. selection of template engine

Freemarker

Thymeleaf

Velocity ( deprecated after version 1.4, deprecated after Spring Framework version 4.3)

Groovy

Mustache

Note: JSP should be avoided as much as possible for the following reasons:

  1. 1. JSP can only be packaged as: War format, does not support jar format, can only run in standard containers (Tomcat,jetty can)

  2. 2. The embedded jetty currently does not support JSPs

  3. 3.    undertow

  4. 4. JSP The custom error page cannot overwrite the spring boot default error page

Four. freemarker Demo

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-freemarker</artifactId>

</dependency>


This article is from the "11642765" blog, please be sure to keep this source http://11652765.blog.51cto.com/11642765/1860299

Spring Boot Foundation 6-web Application Development-template engine Freemarker

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.