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. contains the contentnegotiatingviewresolver and beannameviewresolver beans.
2. support for static resources, including support for Webjars.
3. Auto-register converter,genericconverter,formatter beans.
4. support for the httpmessageconverters.
5. Automatic registration of Messagecoderesolver.
6. support for static index.html.
7. support for Custom favicon.
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. JSP can only be packaged as: War format, does not support jar format, can only run in standard containers (Tomcat,jetty can)
2. The embedded jetty currently does not support JSPs
-
3. undertow
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