@ConfigurationProperties(prefix = "spring. thymeleaf" )
public class ThymeleafProperties {
private static final Charset DEFAULT_ ENCODING = Charset. forName("UTF-8");
private static final MimeType DEFAULT_ _CONTENT_ TYPE = MimeType. value0f("text/html");
public static final String DEFAULT_ PREFIX = "classpath:/templates/";
public static final String DEFAULT_ SUFFIX = " .htm1l";
只要我们把HTML页面放在classpath:/templates/,thymeleaf就能自动渲染;
thymeleaf官方文档