您当前的位置: 首页 >  ide

小志的博客

暂无认证

  • 2浏览

    0关注

    1217博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

idea设置热部署Devtools生效

小志的博客 发布时间:2021-10-26 23:06:10 ,浏览量:2

1、pom.xml文件中添加依赖

(1)、父子聚合工程的情况

  • 在子工程的pom.xml文件添加如下代码:

    
        org.springframework.boot
        spring-boot-devtools
       runtime
        true
    
    
  • 在父工程的pom.xml文件添加如下代码:

    
        
          
            org.springframework.boot
            spring-boot-maven-plugin
            
              true
              true
            
          
        
      
    

(2)、单体工程的情况

  • 直接在pom文件中添加如下代码:

    
        org.springframework.boot
        spring-boot-devtools
       runtime
        true
    
    
    
        
          
            org.springframework.boot
            spring-boot-maven-plugin
            
              true
              true
            
          
        
      
    

2、依次点击【File】——>【Settings…】——>【Build,Execution,Deployment】——>【Compiler】,如下图的4个选项全部勾选。

在这里插入图片描述 3、同时按住【Ctrl+Shift+Alt+/】,弹出如下窗口,点击【Registry…】

在这里插入图片描述 4、在弹出的Registry窗口中,勾选【compiler.automake.allow.when.app.running】和【actionSystem.assertFocusAccessFromEdt】,如下所示:

在这里插入图片描述 在这里插入图片描述 5、重启idea工具,热部署生效。

关注
打赏
1661269038
查看更多评论
立即登录/注册

微信扫码登录

0.0826s