SpringBoot

IDEA中SpringBoot实现热部署

2018-02-19  本文已影响0人  小强不可爱

1,在pom.xml中引入

      <dependencies>
        <!-- spring-boot-devtools 依赖包 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
            <scope>true</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>

2,在idea中设置(Settings-->Complier-->勾选Build project automatically)
3,快捷键(shift-ctrl-a)-->registry...-->勾选compiler.automake.allow.when.app.running
4,重启IDEA

上一篇下一篇

猜你喜欢

热点阅读