zhengjinsheng


在SpringBoot 项目中没有我们之前常规web 开发的WebContent(WebApp),它只有
src 目录。在src/main/resources 下面有两个文件夹,static 和templates。SpringBoot 默认在static
目录中存放静态页面,而templates 中放动态页面。
1 static 目录
Spring Boot 通过classpath/static 目录访问静态资源。注意存放静态资源的目录名称必须
是static。
2 templates 目录
在Spring Boot 中不推荐使用jsp 作为视图层技术,而是默认使用Thymeleaf 来做动态页
面。Templates 目录这是存放Thymeleaf 的页面。

分类:

技术点:

相关文章:

  • 2021-11-20
  • 2021-06-26
  • 2021-10-29
  • 2021-11-20
  • 2021-11-20
  • 2021-12-28
  • 2021-05-23
  • 2021-12-11
猜你喜欢
  • 2022-01-18
  • 2021-12-01
  • 2021-11-20
  • 2021-11-20
  • 2021-11-30
  • 2021-11-20
相关资源
相似解决方案