idea,springboot项目热部署

1.添加依赖

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

2.添加插件

    <build>
        <plugins>
            <!---->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <layout>ZIP</layout>
                    <!-- 没有该配置,devtools 不生效 -->
                    <fork>true</fork>
                </configuration>
            </plugin>
        </plugins>
    </build>

3.设置自动构建

File-->Settings-->Build,Execution,Deployment-->Compile-->勾选Build project automatically

4.修改隐藏属性

ctrl + shift + alt + / --> Registry -->勾选compller.automake.allow.when.app.running

猜你喜欢

转载自blog.csdn.net/qq_35341771/article/details/85340882