【问题标题】:How to deploy a spring boot restful API with Azure pipeline如何使用 Azure 管道部署 Spring Boot Restful API
【发布时间】:2020-02-19 21:49:53
【问题描述】:

我有连接到 mysql 数据库的 spring boot 应用程序。我在 Azure Repo 中有一个 repo,在 Azure Pipeline 中有一个管道。在 Azure 门户上,我制作了一个 Azure Mysql 数据库和一个 Web 应用程序。如何连接 Web 应用程序和管道?我以为我在制作管道时已经连接了它们。我似乎无法使用我的 api,因为我在调用它时得到 404。所有教程都关注如何在没有管道的情况下进行部署,但我的情况并非如此。我错过了什么?

【问题讨论】:

  • 嗨@David Larsson 您有机会查看以下答案吗?如果有任何问题,请告诉我。

标签: mysql spring azure azure-pipelines


【解决方案1】:

除了你上面做的,你还需要做下面的步骤

1,首先您需要创建服务连接以将您的 azure 订阅连接到您的 azure devops 管道。详细步骤请查看Sign in to Azure Pipelines and connect to Azure

2,当你有你的管道时。您还需要customize your pipeline 使用 maven 任务或其他构建任务构建您的 java 应用程序。更多信息请查看Build Java apps

3,您还需要使用Azure App Service Deploy task(在发布管道或构建管道中)将您的应用部署到Azure Web 应用。

Microsoft 提供了一个tutorial,其中包含将 java 应用程序部署到 azure 的详细步骤。

【讨论】:

    猜你喜欢
    • 2021-11-09
    • 2017-03-10
    • 2019-09-26
    • 1970-01-01
    • 2018-06-26
    • 2022-11-21
    • 2017-11-03
    • 2018-08-30
    • 2019-05-03
    相关资源
    最近更新 更多