热部署在Eclipse和IDE里面的使用

热部署在Eclipse和IDE里面的使用
    简介:讲解热部署的好处及使用注意事项,在eclipse里面默认开启,在IDE里面默认关闭
        
        1、增加依赖

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

        2、eclipse热部署默认自动开启

        3、idea里面要设置
            1、相关偏好里开启自动编译
当我们修改了java类后,IDEA默认是不自动编译的,而spring-boot-devtools又是监测classpath下的文件发生变化才会重启应用,所以需要设置IDEA的自动编译:
(1)File-Settings-Compiler-Build Project automatically
2、Shift+Ctrl+Alt+/,选择Registry
                选 compiler.automake.allow.when.app.running  
                重启项目就可以了



        参考:
            https://www.cnblogs.com/aqsunkai/p/6690574.html
            compiler.automake.allow.when.app.running
原文地址:https://www.cnblogs.com/justuntil/p/10422236.html