更多熱門技術(shù)文章
今天在暨大給學(xué)生上課的時候,發(fā)現(xiàn)在 Spring Boot 項目中配置熱部署的方式有一丟丟的改變,具體往下看。
最近還把 IDEA 更新到了 IntelliJ IDEA 2023.1 版本
第一步,在 pom.xml 文件中添加依賴
<!--熱部署配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<!-- 表示依賴不向下傳遞 -->
<optional>true</optional>
</dependency>
第二步,配置 Build project automatically
如果你用的是 Windows 系統(tǒng),請按照 file -> settings -> Build, Execution, Deployment -> compiler 這個路徑找到 build project automatically 并勾上,最后 Apply 和 OK 即可;
如果你用的是 Mac 系統(tǒng),請按照 IntelliJ IDEA -> settings -> Build, Execution, Deployment -> compiler 這個路徑找到 build project automatically 并勾上,最后 Apply 和 OK 即可。
第三步,開啟允許在運(yùn)行中修改文件
如果你用的是 Windows 系統(tǒng),請按照 file -> settings -> Advanced Settings 這個路徑找到 Allow auto-make to start even if developed application is currently running 并勾上,最后 Apply 和 OK 即可;
如果你用的是 Mac 系統(tǒng),請按照 IntelliJ IDEA -> settings -> Advanced Settings 這個路徑找到 Allow auto-make to start even if developed application is currently running 并勾上,最后 Apply 和 OK 即可;文章來源:http://www.zghlxwxcb.cn/news/detail-677762.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-677762.html
如果能幫到您,辛苦幫我點(diǎn)個贊唄,先謝啦!感謝,感謝 ^_^
到了這里,關(guān)于Spring Boot 3.x 全新的熱部署配置方式(IntelliJ IDEA 2023.1)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!