美文网首页
Spring-boot devtool工具的配置

Spring-boot devtool工具的配置

作者: RageYourDream_ | 来源:发表于2017-03-10 09:46 被阅读0次

首先要在pom.xml中引入依赖

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

并增加配置项

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

接着修改配置

Paste_Image.png

再接着修改 Maintenance
command + alt + shift + /

Paste_Image.png

重新加载工程即可

相关文章

网友评论

      本文标题:Spring-boot devtool工具的配置

      本文链接:https://www.haomeiwen.com/subject/rhrngttx.html