美文网首页我爱编程
springboot 在idea中实现热部署

springboot 在idea中实现热部署

作者: 逝者如斯灬 | 来源:发表于2018-04-13 16:11 被阅读0次

第一步:引入热加载的插件,springboot 1.3开始就有的

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

project 中添加spring-boot-maven-plugin,主要在eclipse中起作用,idea不需要加此配置,springboot 项目的话,应该是有此配置,加里面的内容即可。

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

第二部 : idea设置
1、点击: file ,Settings ,Build ,Execution,Deplment


image

然后记得apply,ok。
2、组合键:Shift+ALT+Ctrl+/ ,选择“Registry”,回车,找到“complier.automake.allow.when.app.running”


image

相关文章

网友评论

    本文标题:springboot 在idea中实现热部署

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