如何处理AWS中的大型WAR文件? [英] How to deal with large WAR files in AWS?

查看:115
本文介绍了如何处理AWS中的大型WAR文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了什么?

使用JSP开发了一个Web应用程序,该应用程序允许用户注册,登录和上传文件到AWS S3.我通过上载应用程序的war文件,使用Elastic Beanstalk将此应用程序部署到aws. 对于登录和注册模块,我使用了RDS,它工作正常.

Developed a Web app using JSP which allows user to register , login and upload file to AWS S3. I am deploying this app to aws using Elastic Beanstalk by uploading war file of app. For login and register modules I have used RDS and it is working fine.

问题

当我要将文件上传到S3时,我需要在WEB应用程序中使用AWS开发工具包jar及其支持的JAR文件. 当我完成开发部分并导出war文件时,它大约为75 MB.所以问题是,如果我对ap​​p进行任何更改,都需要将这场大战上传到aws.战争文件的大小受AWS SDK的JAR文件影响.

When I want to upload files to S3 , I need to use AWS SDK jar and its supporting JAR files in WEB app. When I finished with development part and exported war file , it was around 75 MB. So problem is that if I change anything to app , I need to upload this large size war to aws. Size of the war file is effected due to JAR files of AWS SDK.

应对这种情况有哪些选择?

推荐答案

使用Maven之类的构建工具.这将确保将依赖项文件下载到服务器的本地Maven存储库中.因此,它可以减小项目的上载大小. 此处是官方快速指南

Use build tools like Maven. This will ensure the dependency files downloaded in the server's local maven repository. So it makes the upload size of your project, reduced. Here is a official quick guide

这篇关于如何处理AWS中的大型WAR文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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