idea配置SpringBoot的热部署

几个关键的地方:

1、pom文件中添加热部署的依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

2、配置文件resources/application.properties中添加对devtools的配置

#热部署生效
spring.devtools.restart.enabled=true

3、配置idea自动编译项目

a、配置编译器自动构建项目


b、允许app运行的时候自动编译项目。

ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running。




猜你喜欢

转载自blog.csdn.net/ancony_/article/details/81040983