首页 > 技术文章 > thymeleaf初识(继续补充)

xinglongbing521 2019-07-17 20:44 原文

1css和js等需要引入的资源放在static 目录下面

2HTML放在templates下面

3templates是默认的模板位置,thymelelaf是默认的模板引擎

4为了防止templates访问不了静态资源,需要加上:

#拼接html前后缀
spring.resources.static-locations=classpath:/templates/
spring.thymeleaf.suffix=.html

*******************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************8

推荐阅读