前提


1. 添加依赖 

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

spring-boot很多配置都有默认配置,比如默认页面映射路径为 
classpath:/templates/*.html 
同样静态文件路径为 
classpath:/static/


但是我在WEB-UI 下面找不到如下配置:



#thymeleaf start
spring.thymeleaf.mode=HTML5
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
#开发时关闭缓存,不然没法看到实时页面
spring.thymeleaf.cache=false
#thymeleaf end


application.properties 这个文件也找不到 在哪里!!!


有种说法是在resources 里面增加templates 目录,存放html 文件?


电影网站增删改查-3 spring boots/MVC/neo4j/thymeleaf 源码分析 thymeleaf 配置


further ref: http://blog.csdn.net/u012706811/article/details/52185345

相关文章:

  • 2021-10-06
  • 2022-02-25
  • 2022-12-23
  • 2022-01-27
  • 2021-12-30
  • 2021-11-14
  • 2022-12-23
猜你喜欢
  • 2022-01-20
  • 2022-02-10
  • 2022-12-23
  • 2021-12-29
  • 2021-08-15
  • 2021-12-08
  • 2022-12-23
相关资源
相似解决方案