idea springboot热部署无效问题

Intellij IDEA 使用Spring-boot-devTools无效解决办法

springboot项目中遇到的bug

<dependencies>
    <!--spring boot 热加载-->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional><!-- optional=true,依赖不会传递,该项目依赖devtools;之后依赖myboot项目的项目如果想要使用devtools,需要重新引入 -->
    </dependency>
</dependencies>

<build>
    <plugins>
        <!--spring boot 打包插件-->
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <mainClass>com.hjzgg.test.thirdjar.Application</mainClass>
                <fork>true</fork>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
原文地址:https://www.cnblogs.com/hujunzheng/p/7300496.html