自动装配
可以直接放在

直接在配置中引入

所有的位置

一般都会用第二种 而且第二种的优势在于已经在原码中默认 /**
AuttoXXX里 原码中内置的 规定 index.html
index 内置的
Thymeleaf 官网:https://www.thymeleaf.org/
Thymeleaf 在Github 的主页:https://github.com/thymeleaf/thymeleaf
Spring官方文档:找到我们对应的版本
https://docs.spring.io/spring-boot/docs/2.2.5.RELEASE/reference/htmlsingle/#using-boot-starter
在官方文档中可以点pom 进去看一下包 也可以直接添加依赖

@ConfigurationProperties(prefix = "spring.thymeleaf")
public class ThymeleafProperties {
private static final Charset DEFAULT_ENCODING = StandardCharsets.UTF_8;
public static final String DEFAULT_PREFIX = "classpath:/templates/";
public static final String DEFAULT_SUFFIX = ".html";
// 需要添加命名空间 这样才可以用它的语法
<html lang="en" xmlns:th="http://www.thymeleaf.org">

##SringMvc 自动装配
所有的程序都会走 doDispatch() 所以想要看进程可以在这加断点

我们可以自己写一下功能 变成组件 这样Spring Boot 会给我自动装配,简直爽的不行不行的