IntelliJ IDEA 使用spring-boot-devtools热部署无效解决办法

添加依赖

<dependencies>
      
    <!-- 方便调试依赖 -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
    </dependency>

</dependencies>


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

修改IDE配置参数

Mac快捷键:shift+alt+command+/,选择Registry

Window快捷键:Shift+Ctrl+Alt+/,选择Registry

测试成功了,但是该一点代码,就重启一下,而且很慢,不好用,你会受不了的。

猜你喜欢

转载自my.oschina.net/u/3777515/blog/1791330