這是一個關于如何在 IntelliJ 2021.2 上啟用 Dev Tools 專案并觀察代碼變化而無需重新啟動 Tomcat 服務器的教程。
uj5u.com熱心網友回復:
為了使其作業,您需要:
1) 在 maven 或 gradle 中啟用 devtools。在Maven中它看起來像:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope><!-- -->
<optional>true</optional>
</dependency>
2)在IntellijIDEA中:進入設定(ctrl alt s)->構建、執行、部署->編譯器,勾選“自動構建專案”
3) 在設定 -> 編譯器下的高級設定中啟用選項“即使開發的應用程式當前正在運行,也允許自動啟動”

您現在可以重新啟動您的 IntelliJ IDE 并啟動您的應用程式。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/319043.html
