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、访问

 

原文地址:https://www.cnblogs.com/alexzhang92/p/10405533.html