我在项目中添加了springloaded as dependency
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.7.RELEASE</version>
</dependency>
我设置为VM参数:
-javaagent:C:\Users\myuser\.m2\repository\org\springframework\springloaded\1.2.7.RELEASE\springloaded-1.2.7.RELEASE.jar -noverify
热重装仍然无效。我做错了什么/错过了什么?
答案 0 :(得分:0)
根据代码,我假设您尝试将Springloaded
与Spring Boot
应用一起使用。要使用Spring Boot应用程序启用此功能,您应该将其作为对spring-boot-maven-plugin
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.7.RELEASE</version>
</dependency>
</dependencies>
有关hotswapping的更多文档https://docs.spring.io/spring-boot/docs/current/reference/html/howto-hotswapping.html#howto-hotswapping,