springboot配置热部署

话不多说,直接开干。

  1.添加一个热部署的依赖到你项目的pom.xml中

        <!--热部署-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>

  2.再添加一个插件到你项目或父工程的pom.xml中

    <build>
        <finalName>你自己工程的名字</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                    <addResources>true</addResources>
                </configuration>
            </plugin>
        </plugins>
    </build>

  3.开启自动编译选项:

   4.使用快捷键【ctr+alt+shift+/】,然后如下操作:

 

  不要点Resore Default,那是重置,不是保存。

   5.重启idea

原文地址:https://www.cnblogs.com/ibcdwx/p/14220268.html