当前位置:   article > 正文

解决新版 Idea 中 SpringBoot 热部署不生效_idea热部署无效

idea热部署无效
结果视图
标题

依赖中添加

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

插件中设置

<plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
        <fork>true</fork>

</configuration>

</plugin>

1.设置自动编译

Idea 中 setting -> Compiler -> 勾选automatically

2. spring boot 启动设置

编辑启动配置,点击modify options。

options 中需要修改两个配置:

        1.On 'Update' action 中选择 Hot swap classes and update trigger file if failed

        2.On frame deactivation 中选择 Update classes and resources

        3.以 debug 模式启动应用

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/323361
推荐阅读
相关标签
  

闽ICP备14008679号