idea 配置自动编译 livereload

1 pom中添加 spring-boot-devtools 依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

2 更改设置

选中 File->Setting –> Build, Execution, Deployment –> Compiler–>Build project automatically 

3  SHIFT+CTRL+A  输入 registry 在弹出的窗口中

  找到compiler.automake.allow.when.app.running 打上勾

参考:

https://stackoverflow.com/questions/33349456/how-to-make-auto-reload-with-spring-boot-on-idea-intellij

https://www.mkyong.com/spring-boot/intellij-idea-spring-boot-template-reload-is-not-working/

猜你喜欢

转载自www.cnblogs.com/wolbo/p/11431699.html