1.在pom.xml文件中导入依赖

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

2.配置idea

点击idea->file->settring->搜索compiler->勾选Build project automatically

idea中springboot热部署(无需重启项目)

到这一步其实已经很快捷了,只需要点击ctrl+f9,然后刷新浏览器即可

3.点击ctrl+shift+alt+/ 选择Registry

idea中springboot热部署(无需重启项目)

选择compiler.automake.allow.when.app.running:

idea中springboot热部署(无需重启项目)

到这里就算配置完成了

5.直接刷新浏览器,更新代码,不用再重新发布项目

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2022-01-01
  • 2021-12-09
  • 2021-07-24
  • 2021-07-27
猜你喜欢
  • 2022-12-23
  • 2021-04-20
  • 2021-05-08
  • 2022-12-23
  • 2021-09-19
  • 2022-01-03
  • 2021-12-26
相关资源
相似解决方案