简体   繁体   English

如何使用 intelliJ 插件在 azure spring 云上重新部署我的 spring 启动应用程序

[英]How can I redeploy my spring boot application on azure spring cloud using intelliJ plugin

We are currently running our application on azure spring cloud.我们目前正在 azure spring 云上运行我们的应用程序。 Its a backend spring boot application with some controller API's exposed.它是一个后端 spring 启动应用程序,其中公开了一些 controller API。

Now after running the first deploy on a newly created app in the azure spring cloud we are unable to redeploy a newer version.现在,在 azure spring 云中对新创建的应用程序运行第一次部署后,我们无法重新部署更新的版本。 We're not using the staging area but rather direct build to default (production) stage.我们不使用暂存区,而是直接构建到默认(生产)阶段。

To do these deploys we use Intellij Azure plugin for spring cloud.为了进行这些部署,我们使用 spring 云的 Intellij Azure 插件。 Selecting option deploy:选择选项部署: 在此处输入图像描述

and run deploy:并运行部署:

在此处输入图像描述

next we see succesfull deploy on azure:接下来我们看到在 azure 上成功部署:

在此处输入图像描述

A new pod has been created and we see logs under a different id.一个新的 pod 已经创建,我们可以在不同的 id 下看到日志。

在此处输入图像描述

This would suggest that everything went okay.这表明一切顺利。 However when we now try our updated controller endpoint, the changes are not there.但是,当我们现在尝试更新的 controller 端点时,更改并不存在。 We never see the second debug messag "Test update" which was added.我们从未看到添加的第二条调试消息“测试更新”。

@PostMapping(path = "/login")
public ResponseEntity<JwtResponse> loginUser(@RequestBody LoginRequest loginRequest) {
    logger.debug("login attempt " + loginRequest.toString());
    logger.debug("Test update");
    return new ResponseEntity<>(null, HttpStatus.OK);
}

Is this a bug or is there no option to redeploy an application and should you always create a new one?这是一个错误还是没有重新部署应用程序的选项,您应该始终创建一个新应用程序吗?

To check if we were not missing build failures in new version we also created a new app and deployed the changes to this one.为了检查我们是否没有遗漏新版本中的构建失败,我们还创建了一个新应用程序并将更改部署到这个应用程序。 The debug message was printed.打印了调试消息。

Redeploy should create new artifact and deploy all the changes to the existing Azure Spring App.重新部署应该创建新的工件并将所有更改部署到现有的 Azure Spring 应用程序。

Our suggestions here:我们在这里的建议:

  1. Upgrade the Intellij Azure plugin to version v3.70.0将 Intellij Azure 插件升级到 v3.70.0 版本
  2. Before deploying to Azure Spring Apps, please check whether there is a new Artifact being generated.在部署到 Azure Spring Apps 之前,请检查是否有新的 Artifact 正在生成。 Check Artifact检查神器

Reference doc: Deploy Spring Boot applications using IntelliJ参考文档: Deploy Spring Boot applications using IntelliJ

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM