springbootl用thymeleaf整合htm

pom文件:

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

properties文件:

spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=LEGACYHTML5
spring.mvc.static-path-pattern=/static/**
spring.thymeleaf.cache=false

静态文件结构:

原文地址:https://www.cnblogs.com/leeego-123/p/10654507.html