Kan*_* Lu 6 intellij-idea thymeleaf spring-boot
我是thymeleaf和springboot的新手.
我使用IntelliJ IDEA创建了一个带有百万美元的springboot项目,其中包含"New Project" - >"Spring Initalizr".
然后我得到一个项目,其结构如下所示.
demo
|+-src/main
| +-java
| +-resources
| static
| templates
| application.properties
|-pom.xml
Run Code Online (Sandbox Code Playgroud)
问题是我应该在资源下放置静态和模板?他们之间有什么区别?
我想具有百万美元属性的.html文件应该放在模板中.静态html,css和js怎么样?
谢谢.
pez*_*tem 10
templates文件夹是放置所有百日咳模板的地方.它是一个默认目录(默认情况下,spring会查看任何模板的内部).
static文件夹用于提供web静态内容,所有css,js,html等(也是spring的默认文件夹搜索)
http://docs.spring.io/spring-boot/docs/current/reference/html/boot-功能-开发-网络applications.html#引导功能-弹簧MVC静态内容
| 归档时间: |
|
| 查看次数: |
4791 次 |
| 最近记录: |