IDEA 配置spring热部署后没有作用
Idea 热部署完成后没有自动编译
原因解释:idea 默认不是自动编译
1、idea 需要配置一下: File --> settings --> Build,Execution,Deployment --> Compiler --> Build project automatically 找到 Build project automatically 选中 应用 注意:Compiler 是点击,不是Compiler 下的功能 2、ctrl + shift + alt + / 快捷键 register ; 勾上 Compiler autoMake allow when app running
补充idea热部署添加依赖配置
1、添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>2.2.5.RELEASE</version>
</dependency>
2、添加插件及配置
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!-- 热部署需要配置的地方 -->
<fork>true</fork>
</configuration>
</plugin>
</plugins>
<build>
上一篇:
IDEA上Java项目控制台中文乱码
