我们在测试阶段,经常会修改bug,导致需要不断的手动重启服务。有木有觉得很麻烦。SpringBoot官方当然想到了这点,只需在pom.xml中添加一个依赖,即可实现热部署。如下:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<!-- 只给当前项目使用 -->
<optional>true</optional>
</dependency>
之后我们修改代码后,项目会自动的重新加载,使用起来非常方便。
另外今天是10月24号,祝我们节日快乐哈。?