目录结构
static中的文件可以直接访问,http://localhost:90/ssm/upload.html
templates 中的文件不能直接访问,可以通过controller 访问
html 热加载
要想修改html文件后不重启,需要如下设置
1.在pom中直接引入依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2.设置idea的两项功能
“File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically”
组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running”
3.app.properties
spring.thymeleaf.cache=false