1. 程式人生 > >idea,springboot專案熱部署

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