IDEA中springboot的热部署

在pom.xml文件中添加依赖

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

<build>中添加一下插件

           <plugin>
                <!--热部署配置-->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <!--fork:如果没有该项配置,整个devtools不会起作用-->
                    <fork>true</fork>
                </configuration>
            </plugin>        

Ctrl+alt+s打开setting勾选如下实现自动编译

 

ctrl + shift + alt + /点击Registry

勾选Compiler autoMake allow when app running

 修改完成

  1.  

猜你喜欢

转载自www.cnblogs.com/oldzhang1222/p/10616608.html