热部署在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

 

相关文章:

  • 2021-11-24
  • 2021-09-06
  • 2021-07-14
  • 2021-06-03
  • 2022-12-23
  • 2021-12-02
  • 2021-09-29
  • 2021-10-23
猜你喜欢
  • 2021-12-21
  • 2022-02-08
  • 2021-04-10
  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
相关资源
相似解决方案