1. 程式人生 > 其它 >Eclipse中SpringBoot專案配置熱部署

Eclipse中SpringBoot專案配置熱部署

技術標籤:SpringBoot安裝配置

一、在pom.xml檔案中新增依賴:

<!-- 熱部署 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>

二、在application.yml檔案新增一下內容:

spring:
  resources:
    chain:
      cache: false

如圖下圖所示,一定要注意false前面有個空格。
在這裡插入圖片描述
三、設定專案Build Automatically
在這裡插入圖片描述

四、重啟專案,熱部署就設定成功了
在這裡插入圖片描述