技术交流群:816227112
File-Settings-Compiler-Build Project automatically
ctrl + shift + alt + /然后选择Registry,勾上 Compiler.autoMake.allow.when.app.running
参考: https://blog.csdn.net/qq_37598011/article/details/80778915
上面这个用着用着不行了,而且选 Compiler.autoMake.allow.when.app.running 的选项也没有了
还是得用devtools
步骤:
maven:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <version>2.0.4.RELEASE</version> <optional>true</optional> </dependency> </dependencies> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin> </plugins>
properties
#热部署生效 spring.devtools.restart.enabled: true #设置重启的目录 spring.devtools.restart.additional-paths: src/main #classpath目录下的WEB-INF文件夹内容修改不重启 spring.devtools.restart.exclude: WEB-INF/**
参考:https://www.cnblogs.com/a8457013/p/8065827.html