1.在启动方法中,加入如下
System.setProperty("spring.devtools.restart.enabled", "false");
2.properties文件
spring.devtools.restart.enabled=false
3.yml文件
devtools:
#热部署生效
enabled: true
restart:
#添加那个目录的文件需要restart
additional-paths: src/main/java
#排除那个目录的文件不需要restart
exclude: src/main/resources/views/**,src/main/resources/static/**