使用springloaded
在maven中的<plugins>標籤中加入springloadedjava
<plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <dependenices> <dependency> <groupId>org.springframework</groupId> <artifactId>springloaded</artifactId> <version>1.2.6RELEASE</version> </dependency> </dependenices> </plugin> </plugins>
命令行中切換到pom.xml文件夾下,使用maven啓動spring bootspring
mvn spring-boot:run
還有一種方式,能夠直接下載springloaded的jar包,而後在Run Configurations中設置VM argumentsmaven
-javaagent:D:\springloaded-1.2.6RELEASE.jar -noverify
使用spring-boot-devtools
在maven中增長依賴spring-boot
<dependenices> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency> </dependenices>