SpringBoot 使用IDEA 配置热部署
在开发中稍微更改一点内容就要重启,很麻烦。这个时候使用Spring Boot的热部署就能解决你的问题。
上图:
1,在pom.xml文件中添加依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
具体的截图为:
第一步完成,然后打开设置勾选:
第三步然后使用快捷键ctrl+shift+alt+/
选择第一项Registry..,然后找到compiler.automake.allow.when.app.running勾选,然后close
最后重启IDEA即可,亲测,可用