美文网首页
SpringBoot启动热部署

SpringBoot启动热部署

作者: ChipDavid | 来源:发表于2019-02-28 14:01 被阅读0次

                                                SpringBoot启动热部署

1.在pom.xml中添加依赖

<dependency>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-devtools</artifactId>

            <!-- optional=true, 依赖不会传递, 该项目依赖devtools;

                之后依赖boot项目的项目如果想要使用devtools, 需要重新引入 -->

            <optional>true</optional>

        </dependency>

pom.xml

2.修改application.properties文件

这一步根据实际情况来设置,一般可设置在开发环境即可;

spring.devtools.restart.enabled=true

application.properties

3.idea的修改

3.1       File-Settings-Compiler-Build Project automatically

idea的设置

3.2      

       ctrl + shift + alt + /然后选择Registry,勾上 Compiler.autoMake.allow.when.app.running

4.修改java文件,然后保存;待控制台出现了以下数据表示重启完成;

5.开发的时候有时候热部署无效,还是得重启,不能死磕;

注:本文转载于:https://blog.csdn.net/qq_37598011/article/details/80778915

相关文章

网友评论

      本文标题:SpringBoot启动热部署

      本文链接:https://www.haomeiwen.com/subject/bkmhuqtx.html