将War文件部署到Azure

编程入门 行业动态 更新时间:2024-10-21 20:33:06
本文介绍了将War文件部署到Azure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试将一个Web服务的War文件上传到Azure,运行tomcat 8. 我在onedrive上的相关webapps文件夹中有war文件,但部署始终失败,令人沮丧它没有错误消息。

我很确定如果我不能使用涉及将二进制文件上传到Azure的方法,我就无法使用Azure。当使用像github这样的存储库时,由于引用问题,构建会失败,所以我认为这不是一个选项。

不幸的是我必须使用Azure,我知道有了像AWS这样的其他服务,我可以在5分钟内完成,因为你可以直接上传而不需要任何微软(tm)麻烦。

解决方案

通常,有四种方法可以在Azure Web Apps上部署war文件:FTP,存储库,如Github / BitBucket或OneDrive / Dropbox,Kudu工具,Azure Toolkit for Eclipse / IntelliJ。

首先,你需要知道

  • 使用像GitHub这样的存储库,你可以参考Kudu wiki页面

  • 一种方便快捷的方法是使用Kudu工具拖动和放大将您的war文件放入 webapps 目录,如下所示。
  • 如果您安装了Azure Toolkit for Eclipse / IntelliJ,则可以参考将Java Web Apps部署到Azure使用Eclipse 或 IntelliJ:将Java Web应用程序部署到Azure 来执行此操作。
  • 希望它有所帮助。如有任何疑虑,请随时告诉我。

    I am attempting to upload a War file of a web service to Azure, running tomcat 8. I have the war file in the relevant webapps folder on onedrive, however the deployment consistently fails, and frustratingly it does so without an error message.

    I'm pretty sure that if I can't use a method involving uploading the binary file to Azure, I cannot use Azure. When using repositories like github, the build would fail due to reference issues, so I believe that is not an option.

    Unfortunately I must use Azure, I'm aware that with other services like AWS I'd be done in 5 minutes as you can directly upload without any Microsoft (tm) hassle.

    解决方案

    Normally, there are 4 ways to deploy a war file on Azure Web Apps: FTP, repository like Github/BitBucket or OneDrive/Dropbox, Kudu Tool, Azure Toolkit for Eclipse/IntelliJ.

    First of all, you need to know File structure on azure. The Java war file must be deployed at the directory webapps under the wwwroot path of Azure Web Apps. You can access the Kudu tool url <your-webapp-name>.scm.azurewebsites/DebugConsole to lookup it.

  • Using FTP for deployment, you can refer to the Kudu wiki page Accessing files via ftp to know it, and set the FTP user & password via Azure portal as below.
  • Using repository like GitHub, you can refer to the Kudu wiki page Deploying from GitHub to know it. Please first make sure the file structure on GitHub repository as the same as its under your wwwroot directory, as below.
  • A convenient and fast way is using Kudu tool to drag & drop your war file into the webapps directory, as below.
  • If you had installed Azure Toolkit for Eclipse/IntelliJ, you can refer to Deploy Java Web Apps to Azure using Eclipse or IntelliJ: Deploy Java Web Apps to Azure to do it.
  • Hope it helps. Any concern, please feel free to let me know.

    更多推荐

    将War文件部署到Azure

    本文发布于:2023-11-26 00:00:22,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1631859.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:文件   War   Azure

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!