springboot 热部署配置(springloaded)

注意此方法对于新增加的方法不起作用
首先还是pom.xml增加配置信息

<build>
<plugins>
  	<plugin>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-maven-plugin</artifactId>
		<dependencies>  
		     <!--springloaded  hot deploy -->  
		     <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>
</plugins>
 </build>

在项目目录下创建文件夹lib 放入springloaded-1.2.4.RELEASE.jar这个jar包
右键run configurations 在arguments——>vmarguments增加

-javaagent:.\lib\springloaded-1.2.4.RELEASE.jar -noverify

然后run as也可以进行热启动 不存在端口未关闭情况

猜你喜欢

转载自blog.csdn.net/qq_42019139/article/details/85007037