在 pom文件中加入相應的依賴便可。spring
熱部署的方式1:maven
<dependency>spring-boot
<groupId>org.springframework.boot</groupId>ui
<artifactId>spring-boot-devtools</artifactId>ci
<version>1.4.1.RELEASE</version>部署
<optional>true</optional>io
</dependency>class
<build>plugin
<plugins>tools
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
熱部署的方式2:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin </artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.4.RELEASE</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>exec</classifier>
</configuration>
</execution>
</executions>
</plugin>