关于springboot:springboot热加载

基于IDEA的热加载。

在pom.xml中增加相应的依赖

<!-- 热加载-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
    <!--<scope>true</scope>-->
</dependency>

在pom.xml中增加相应的插件

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <fork>true</fork><!-- 如果没有该配置,热部署的devtools不失效 -->
 </configuration>
</plugin>

设置IDEA

ctrl+shit+alt+/ 快捷键并点击Registry
mac快捷键 command+shit+option+/ 快捷键并点击Registry

找到如下图对应的Key并勾选

依照如上所述步骤即可开启IDEA开发spring热加载性能。

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理