1.点击idea中tomcat设置
![2743275-3fe568f8bf91e47d.png](https://upload-images.jianshu.io/upload_images/2743275-3fe568f8bf91e47d.png)
![2743275-caa6ca957eb84723.png](https://upload-images.jianshu.io/upload_images/2743275-caa6ca957eb84723.png)
2.点击deployment查看Deploy at the server startup 中tomcat每次所运行的包是 xxxx:war 还是其他,如果是xxxx:war包,请更换.点击旁边绿色加号,选择 xxxx:war exploded ,然后将 xxxx:war 点击红色删除掉
![2743275-0d3e6d9030c5e05a.png](https://upload-images.jianshu.io/upload_images/2743275-0d3e6d9030c5e05a.png)
3.然后在server中 将 "On Update action"、"On frame deactivation" 都选择 update classes and resources
![2743275-b88d5c823317f2f5.png](https://upload-images.jianshu.io/upload_images/2743275-b88d5c823317f2f5.png)
4.大功告成,已亲测,不用因为每次修改代码而重启了!