1:thymeleaf配置
spring.thymeleaf.cache=false
spring.thymeleaf.suffix=.html
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.mode=HTML5
spring.thymeleaf.encoding=UTF-8
spring.devtools.restart.enabled=true
2.在 pom.xml 里添加spring-boot-devtools 依赖
org.springframework.boot spring-boot-devtools true org.springframework.boot spring-boot-maven-plugin true3.开启 idea 自动 build 功能
ctrl+shift+a 搜索registry