maven配置热部署

来源:互联网 发布:如何进行会员数据分析 编辑:程序博客网 时间:2024/05/16 12:19

1.引入devtools包

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

2.修改plugin

    <!--增加-->    <configuration>        <fork>true</fork>    </configuration>    <!--增加之后-->    <build>        <plugins>            <plugin>                <groupId>org.springframework.boot</groupId>                <artifactId>spring-boot-maven-plugin</artifactId>                <configuration>                    <fork>true</fork>                </configuration>            </plugin>        </plugins>    </build>

idea不生效参考网上找到答案

1.勾选compile下的自动编译

这里写图片描述
2.按下Ctrl+Shift+Alt+/,找到Registry,找到compiler.automake.allow.when.app.running勾选
这里写图片描述
这里写图片描述

0 0