springboot热加载

基于IDEA的热加载。spring

在pom.xml中添加相应的依赖maven

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

在pom.xml中添加相应的插件spring-boot

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

设置IDEAspa

image.png

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

image.png

找到以下图对应的Key并勾选code

image.png

按照如上所述步骤便可开启IDEA开发spring热加载功能。xml

相关文章
相关标签/搜索