idea热部署SpringBoot

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sinat_36710456/article/details/86493756

1)在pom文件中添加依赖:

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

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <!--该配置必须-->
                <fork>true</fork>
            </configuration>
        </plugin>
    </plugins>
</build>

2)左上角依次找到【File】——【Settings...】——【Build,Execution,Deployment】——【Compiler】,

勾选"Build project automatically",然后右下角【Apply】——【OK】:

3)点击idea右上角搜索图标,搜索"Registry",选择搜索出来的最后一个:

4)找到"compiler.automake.allow.when.app.running",勾选,

点击【Close】关闭:

5)重启idea

猜你喜欢

转载自blog.csdn.net/sinat_36710456/article/details/86493756