1. 程式人生 > 其它 >IDEA Jrebel熱部署不生效解決方案

IDEA Jrebel熱部署不生效解決方案

今天嘗試熱部署,沒想到弄了半天沒反應,最後經查閱發現此問題,希望同樣問題的這個沒配置的去新增試下,希望能幫到你
第一步pom檔案引入座標

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

第二步在pom檔案增加下面配置

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork><!--必須新增這個配置-->
                </configuration>
            </plugin>
        </plugins>
</build>

第三步
idea裡面要設定
1、在IDEA中開啟自動編譯

2、Shift+Ctrl+Alt+/,選擇Registry
選 compiler.automake.allow.when.app.running
重啟專案就可以了