springboot在intellij中的热部署(Hot swapping)配置
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                springboot在intellij中的热部署(Hot swapping)配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                File->Other Settings(針對新工程設置,免得每次新工程都要這么設置一遍太麻煩了)
File->Settings(讓當前工程生效)
①輸入build搜索,勾選下面的Build project automatically(如果不勾選那么每次修改代碼文件后就需要手動build了)
?
?
②按下Ctrl+Shift+Alt+/
勾選下面的compiler.automake.allow.when.app.running(貌似這個需要等上面的設置好了并且重啟intellij后才會出現,否則可能找不到)
③pom.xml中加入:
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId></dependency>?
pom.xml中加入:(在其他博客中有提到,但是我測了下并不需要)
<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><fork>true</fork></configuration></plugin></plugins> </build>?
?
下面這個也是實測不需要
application.properties 里添加
?
④禁用chrome的cache
?
Reference:
[1]IntelliJ IDEA SpringBoot Thymeleaf 熱部署,實現修改java文件和html文件無需手動編譯重啟即可
總結
以上是生活随笔為你收集整理的springboot在intellij中的热部署(Hot swapping)配置的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 欧蓝德怎么样(欧蓝德2021款怎么样)
- 下一篇: 数据驱动的不同含义
