摘要: 所谓热部署,就是在应用正在运行的时候升级软件,却不需要重新启动应用。对于java应用程序来说,热部署就是在运行时更新java类文件。
1、在对应的pom.xml 文件中添加依赖
2、注:project 中添加 spring-boot-maven-plugin,主要在eclipse中使用,idea中不需要添加此配置。【idea 忽略这个步骤哦(⊙o⊙)?】
3、更改idea配置
1) “file” -> “settings” -> “build,execution,deplyment” -> “compiler”,选中打勾 “build project automatically” 。
2) 组合键:“shift+ctrl+alt+/” ,选择 “registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。
4、chrome禁用缓存【开发时打开】
f12或者“ctrl+shift+i”,打开开发者工具,“network” 选项卡下 选中打勾 “disable cache(while devtools is open)”
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持服务器之家。
原文链接:https://my.oschina.net/u/3375733/blog/1581756