maven配置熱部署

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勾選
這裏寫圖片描述
這裏寫圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章