springBoot热部署配置

Spring Boot - DevTools 热部署介绍

1、添加依赖

<!--spring boot 热部署的依赖-->

        <dependency>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-devtools</artifactId>

        </dependency>

 

2、重启项目

3、修改或添加代码

@RequestMapping("/hello2")

public String hello2() {

return "auto restart and deploy";

}

 

4、可看到控制台输出重启日志

5、访问

 

posted @ 2019-02-20 11:28  zhangqi0828  阅读(153)  评论(0编辑  收藏  举报