在Springboot项目中没用我们之前常规的web开发的WebContent(WebApp),它只有src目录
在src/main/resource下面两个文件夹,static和templates。Springboot默认在static目录中存放静态页面,而templates中放动态页面
1,static目录
Springboot通过classpath/static目录访问静态资源,注意存放静态资源的目录名称必须是static 如:图片 HTML
2,templates目录
在Springboot中不推荐使用jsp作为视图层技术,而是默认使用Thymeleaf来做动态页面,Templates目录是存放Thymeleaf页面的
原文:https://www.cnblogs.com/yz-bky/p/12759912.html