Spring Boot采用devtools热部署

2018-09-15  本文已影响0人  风丶无痕

什么是热部署?

认识spring-boot-devtools

使用方法

<!-- spring boot devtools 依赖包 -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
    <scope>true</scope>
</dependency>

build节点

<build>
    <plugins>
        <!-- 这是spring boot devtool plugin -->
            <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
                       <configuration>
                            <!-- 如果没有该项配置devtools不会起作用-->
                            <fork>true</fork>
                      </configuration>
            </plugin>
    </plugins>
</build>

说明

上一篇 下一篇

猜你喜欢

热点阅读