課程
/后端開發(fā)
/Java
/SpringBoot開發(fā)常用技術(shù)整合
老師您好,我的熱部署在修改完代碼之后,也確實(shí)重新生成了,但是我在頁(yè)面刷新確沒有顯示變化這是為什么呢
2018-04-19
源自:SpringBoot開發(fā)常用技術(shù)整合 4-1
正在回答
在pox文件加上這
<build>
? ? <plugins>
? ? ? <plugin>
? ? ? ? <groupId>org.springframework.boot</groupId>
? ? ? ? <artifactId>spring-boot-maven-plugin</artifactId>
? ? ? ? <configuration>
? ? ? ? ? <!-- 沒有該配置,devtools 不生效 -->
? ? ? ? ? <fork>true</fork>
? ? ? ? ? <addResources>true</addResources>
? ? ? ? </configuration>
? ? ? </plugin>
? ? </plugins>
? </build>
但是配置好無效,下面需要修改idea中的兩個(gè)配置
setting –> compiler?
將 Build project automatically 勾選上
alt + shift + a 搜索 registry 選第一個(gè),彈出框后下拉找到 compiler.automake.allow.when.app.running 勾選上即可。
熱部署無效問題已解決。
---------------------?
作者:bruinmin?
來源:CSDN?
原文:https://blog.csdn.net/android_ztz/article/details/79221753?
版權(quán)聲明:本文為博主原創(chuàng)文章,轉(zhuǎn)載請(qǐng)附上博文鏈接!
class 文件沒有編譯
pom文件里要添加fork屬性
<plugin> ???<groupId>org.springframework.boot</groupId> ???<artifactId>spring-boot-maven-plugin</artifactId> ???<configuration> ??????<fork>true</fork> ???</configuration> </plugin>
一葉秋才
當(dāng)我們修改了java類后,IDEA默認(rèn)是不自動(dòng)編譯的,而spring-boot-devtools又是監(jiān)測(cè)classpath下的文件發(fā)生變化才會(huì)重啟應(yīng)用,所以需要設(shè)置IDEA的自動(dòng)編譯:
(1)File-Settings-Compiler-Build Project automatically
(2)ctrl + shift + alt + /,選擇Registry,勾上 Compiler autoMake allow when app running
楓橋小生
KingS_F_YM
你是不是沒有配置pom.xml需要增加這段代碼
?<dependency>??
? ? ? ? ? ? <groupId>org.springframework.boot</groupId>??
? ? ? ? ? ? <artifactId>spring-boot-devtools</artifactId>
? ? ? ? ? ? <optional>true</optional>??
</dependency>
舉報(bào)
SpringBoot 極簡(jiǎn)開發(fā)的框架整合利器
1 回答Springboot熱部署
3 回答熱部署能Restart,但是json內(nèi)容未改變
1 回答線上熱部署
1 回答熱部署不生效啊?哪位碰到類似的問題了?
2 回答熱部署問題
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-10-29
在pox文件加上這
<build>
? ? <plugins>
? ? ? <plugin>
? ? ? ? <groupId>org.springframework.boot</groupId>
? ? ? ? <artifactId>spring-boot-maven-plugin</artifactId>
? ? ? ? <configuration>
? ? ? ? ? <!-- 沒有該配置,devtools 不生效 -->
? ? ? ? ? <fork>true</fork>
? ? ? ? ? <addResources>true</addResources>
? ? ? ? </configuration>
? ? ? </plugin>
? ? </plugins>
? </build>
但是配置好無效,下面需要修改idea中的兩個(gè)配置
setting –> compiler?
將 Build project automatically 勾選上
alt + shift + a 搜索 registry 選第一個(gè),彈出框后下拉找到 compiler.automake.allow.when.app.running 勾選上即可。
熱部署無效問題已解決。
---------------------?
作者:bruinmin?
來源:CSDN?
原文:https://blog.csdn.net/android_ztz/article/details/79221753?
版權(quán)聲明:本文為博主原創(chuàng)文章,轉(zhuǎn)載請(qǐng)附上博文鏈接!
2018-07-25
class 文件沒有編譯
2018-06-30
pom文件里要添加fork屬性
2018-06-05
當(dāng)我們修改了java類后,IDEA默認(rèn)是不自動(dòng)編譯的,而spring-boot-devtools又是監(jiān)測(cè)classpath下的文件發(fā)生變化才會(huì)重啟應(yīng)用,所以需要設(shè)置IDEA的自動(dòng)編譯:
(1)File-Settings-Compiler-Build Project automatically
(2)ctrl + shift + alt + /,選擇Registry,勾上 Compiler autoMake allow when app running
2018-04-19
你是不是沒有配置pom.xml需要增加這段代碼
?<dependency>??
? ? ? ? ? ? <groupId>org.springframework.boot</groupId>??
? ? ? ? ? ? <artifactId>spring-boot-devtools</artifactId>
? ? ? ? ? ? <optional>true</optional>??
</dependency>