SpringBoot 的热部署

1、pom.xml 

 <!--SpringBoot热部署-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>
 <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                <!--fork :  如果没有该项配置,肯定devtools不会起作用,即应用不会restart -->
                <fork>true</fork>
            </configuration>
            </plugin>

2、setting


3、设置 Ctrl + shift + A  搜索 registry


compiler.automake.allow.when.app.running   打钩


猜你喜欢

转载自blog.csdn.net/qq_28289405/article/details/81010517