Spring boot熱部署devtools過程解析
1 pom.xml文件
注:熱部署功能spring-boot-1.3開始有的
<!--添加依賴--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <!-- optional=true,依賴不會(huì)傳遞,該項(xiàng)目依賴devtools;之后依賴myboot項(xiàng)目的項(xiàng)目如果想要使用devtools,需要重新引入 --> <optional>true</optional> </dependency>
注:project 中添加 spring-boot-maven-plugin,主要在eclipse中使用,idea中不需要添加此配置。
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
2 更改idea配置
1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,選中打勾 “Build project automatically” 。
2) 組合鍵:“Shift+Ctrl+Alt+/” ,選擇 “Registry” ,選中打勾 “compiler.automake.allow.when.app.running” 。
3 Chrome禁用緩存
F12或者“Ctrl+Shift+I”,打開開發(fā)者工具,“Network” 選項(xiàng)卡下 選中打勾 “Disable Cache(while DevTools is open)”
以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- 解決SpringBoot使用devtools導(dǎo)致的類型轉(zhuǎn)換異常問題
- Springboot項(xiàng)目基于Devtools實(shí)現(xiàn)熱部署步驟詳解
- SpringBoot實(shí)現(xiàn)devtools實(shí)現(xiàn)熱部署過程解析
- spring-boot中使用spring-boot-devtools的實(shí)現(xiàn)代碼
- SpringBoot如何通過devtools實(shí)現(xiàn)熱部署
- IntelliJ IDEA中SpringBoot項(xiàng)目通過devtools實(shí)現(xiàn)熱部署的方法
- Spring Boot集成spring-boot-devtools開發(fā)時(shí)實(shí)現(xiàn)熱部署的方式
- 基于Spring Boot DevTools實(shí)現(xiàn)開發(fā)過程優(yōu)化
相關(guān)文章
JAVA提高第八篇 動(dòng)態(tài)代理技術(shù)
這篇文章主要為大家詳細(xì)介紹了JAVA動(dòng)態(tài)代理技術(shù)的相關(guān)資料,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-10-10
springMVC利用FastJson接口返回json數(shù)據(jù)相關(guān)配置詳解
本篇文章主要介紹了springMVC利用FastJson接口返回json數(shù)據(jù)相關(guān)配置詳解,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-06-06
SpringBoot統(tǒng)一數(shù)據(jù)返回的幾種方式
在Web應(yīng)用程序開發(fā)中,統(tǒng)一數(shù)據(jù)返回格式對(duì)于前后端分離項(xiàng)目尤為重要,本文就來介紹一下SpringBoot統(tǒng)一數(shù)據(jù)返回的幾種方式,具有一定的參考價(jià)值,感興趣的可以了解一下2024-07-07
SpringBoot和Springfox(Swagger)版本不兼容的解決方案
documentationPluginsBootstrapper這個(gè) bean 無法正常啟動(dòng),原因是遇到了空指針異常(NullPointerException),這通常是由于 Spring Boot 和 Springfox 的版本不兼容導(dǎo)致的路徑匹配策略沖突,本文給大家介紹了SpringBoot和Springfox(Swagger)版本不兼容的解決方案2024-12-12
詳解MyBatis-Plus updateById方法更新不了空字符串/null解決方法
這篇文章主要介紹了詳解MyBatis-Plus updateById方法更新不了空字符串/null解決方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-09-09

