springbootl用thymeleaf整合htm

pom文件:html

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

properties文件:java

 

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

 

静态文件结构:spring

相关文章
相关标签/搜索