1

我有一个托管在 Bitbucket 存储库上的标准 Spring Boot 应用程序,它使用 bitbucket-pipeline.yml 文件来运行 maven 构建

image: maven:3.3.3

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - mvn clean install

从将自定义 Java Web 应用程序上传到 Azure - https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-java-custom-upload Azure 文档中指出该文件是我的 Spring Boot 应用程序需要

Springboot
In order to get a Springboot application running you need to upload your JAR or WAR file and add the following web.config file. The web.config file goes into the wwwroot folder. In the web.config adjust the arguments to point to your JAR file, in the following example the JAR file is located in the wwwroot folder as well.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>
    <httpPlatform processPath="%JAVA_HOME%\bin\java.exe"
        arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar &quot;%HOME%\site\wwwroot\my-web-project.jar&quot;">
    </httpPlatform>
  </system.webServer>
</configuration>

我有两个问题。我应该在哪里将此文件添加到现有项目目录结构中?然后应该在管道文件中添加哪些命令来进行 FTP 部署?

4

0 回答 0