熱部署 Devtools: Adding devtools to your project Adding plugin to your pom.xml Enabling automatic build Update the value of Restart IDEA(不一定需要) 在要熱部署的項目中 ...
熱部署 Devtools:
- Adding devtools to your project
- Adding plugin to your pom.xml
- Enabling automatic build
- Update the value of
- Restart IDEA(不一定需要)
在要熱部署的項目中,加入 devtools 的依賴
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
父 pom 中加入插件,並且配置
<build>
<finalName>xxxx</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>
設置自動 build