减少战争大小,以便频繁的重新部署(上传)到远程服务器 [英] Reduce war size for frequent redeployments(uploads) to a remote server

查看:104
本文介绍了减少战争大小,以便频繁的重新部署(上传)到远程服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发过程中,我需要经常更新我的网页应用源代码&将更新的战争部署到远程Tomcat服务器。上传大型战争(25MB)在我的连接上花费的时间太长(约30分钟),这是非常无效的。有什么办法可以减少战争的大小吗?我的项目有很多外部依赖。我可以仅部署更改(可能依赖性保持不变)?

解决方案

你在问什么(我可以只部署更改吗? )不能完成。还有其他一些事情可以减少你的战争文件的文件大小:


  1. 您可以将库放在tomcat的公用目录(tomcat -dir / common / lib),并将其从您的war文件中的依赖关系中删除(在tomcat中管理库<一>)。

  2. 将静态文件放在您的tomcat上的cdn或其他Web应用程序上(这将需要修改代码)


While development I need to frequently update my web app source code & deploy the updated war to a remote Tomcat server. Uploading a big war(25MB) takes too long(around 30 min) on my connection which is very unproductive. Is there any way I could reduce the war size ? There are a lot of external dependencies in my project. Could I deploy just the changes(may be dependencies remain intact) ?

What you are asking (Could I deploy just the changes?) cannot be done. There are other things you can do though to reduce the file size of your war file:

  1. You can place libraries in tomcat's common directory (tomcat-dir/common/lib) and remove them from your dependencies in your war file (Managing libraries in tomcat).
  2. Place static file on a cdn or another web application on your tomcat (that would require code modification though)

这篇关于减少战争大小,以便频繁的重新部署(上传)到远程服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆