(1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。
(2) 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running”
还不行,上大招
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtool</artifactId>
<optional>true</optional>
</dependency>
配置文件
spring:
#热部署
devtools:
restart:
enabled: true #设置开启热部署
additional-paths: src/main/java #重启目录
exclude: WEB-INF/**
freemarker:
cache: false #页面不加载缓存,修改即时生效