第一步:将Tomcat设置为热部署模式:

a). 在顶部找到程序运行操作栏, 点击Edit Configurations

IDEA设置热部署

b). 点击你要配置的tomcat,点击deployment,点击”+“

IDEA设置热部署

c). 然后选择你要部署的war包,热部署必须要选择带有exploded的war包

IDEA设置热部署

d). 再切换回Server,按照下图标注配置

IDEA设置热部署

 

第二步: 设置IDEA开启项目自动编译,进入设置找到Build,Execut, Deployment -> Compiler 勾选中左侧的Build Project automatically

IDEA设置热部署 

IDEA设置热部署

第三步: IDEA开启项目运行时自动make,

shift+alt+/(windows系统) 搜索命令:registry -> 勾选compiler.automake.allow.when.app.running 
 
点击Registry之后勾选compiler.automake.allow.when.app.running 

IDEA设置热部署

IDEA设置热部署

配置完毕后重新部署项目当修改项目时不用重新启动项目就可以马上看到效果了。

 

相关文章:

  • 2021-05-28
  • 2021-04-16
  • 2021-11-23
  • 2021-08-30
  • 2021-08-27
  • 2021-07-13
猜你喜欢
  • 2021-12-31
  • 2021-05-31
  • 2021-05-27
  • 2021-07-13
相关资源
相似解决方案