課程
/后端開發
/Java
/SpringBoot開發常用技術整合
老師您好,我的熱部署在修改完代碼之后,也確實重新生成了,但是我在頁面刷新確沒有顯示變化這是為什么呢
2018-04-19
源自:SpringBoot開發常用技術整合 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中的兩個配置
setting –> compiler?
將 Build project automatically 勾選上
alt + shift + a 搜索 registry 選第一個,彈出框后下拉找到 compiler.automake.allow.when.app.running 勾選上即可。
熱部署無效問題已解決。
---------------------?
作者:bruinmin?
來源:CSDN?
原文:https://blog.csdn.net/android_ztz/article/details/79221753?
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!
class 文件沒有編譯
pom文件里要添加fork屬性
<plugin> ???<groupId>org.springframework.boot</groupId> ???<artifactId>spring-boot-maven-plugin</artifactId> ???<configuration> ??????<fork>true</fork> ???</configuration> </plugin>
一葉秋才
當我們修改了java類后,IDEA默認是不自動編譯的,而spring-boot-devtools又是監測classpath下的文件發生變化才會重啟應用,所以需要設置IDEA的自動編譯:
(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>
舉報
SpringBoot 極簡開發的框架整合利器
1 回答Springboot熱部署
3 回答熱部署能Restart,但是json內容未改變
1 回答熱部署不生效啊?哪位碰到類似的問題了?
2 回答熱部署問題
1 回答線上熱部署
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
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中的兩個配置
setting –> compiler?
將 Build project automatically 勾選上
alt + shift + a 搜索 registry 選第一個,彈出框后下拉找到 compiler.automake.allow.when.app.running 勾選上即可。
熱部署無效問題已解決。
---------------------?
作者:bruinmin?
來源:CSDN?
原文:https://blog.csdn.net/android_ztz/article/details/79221753?
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!
2018-07-25
class 文件沒有編譯
2018-06-30
pom文件里要添加fork屬性
2018-06-05
當我們修改了java類后,IDEA默認是不自動編譯的,而spring-boot-devtools又是監測classpath下的文件發生變化才會重啟應用,所以需要設置IDEA的自動編譯:
(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>