Fear not that the life shall come to an end, but rather fear that it shall never have a beginning.
不要害怕你的生活将要结束,应该担心你的生活永远不会真正开始。
在使用jrebel运行spring-boot的时候,会发现一个很棘手的问题,就是项目不能自动编译,不能自动编译就不能实现热部署。(使用jar包方式运行的时候)
那么我们就要解决自动编译的问题,首先:
1、pom文件中加入依赖,
<!--热部署-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<!-- Package as an executable jar -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork><!--注意要修改这里-->
</configuration>
</plugin>
</plugins>
</build>