Java on Azure Tooling的更新 – 2023年8月

Jialuo Gan

大家好,欢迎阅读 Java on Azure 工具的八月更新。在本次更新中,我们将推出新的以应用程序为中心的视图支持,帮助开发人员在一个项目视图中管理和连接资源,并改进 Azure 应用服务的部署状态。我们希望您喜欢这项功能,并享受使用 Azure 工具包的流畅体验。请下载并安装 IntelliJ 的 Azure 工具包。让我们开始吧!

Azure Toolkit for IntelliJ 提升

以应用为中心的视图

在四月份的博客中,我们介绍了路线图中以应用为中心的视图体验。对于使用 Azure 资源管理器的开发人员来说,我们了解当前将资源连接到项目的工作流程非常耗时,因为他们需要在项目视图和 Azure 资源管理器之间频繁切换。我们还发现,由于开发人员需要手动配置这些连接字符串,因此他们感觉很复杂。

基于这些原因,我们一直在进行投资,以便在工具包中实现这种以应用程序为中心的体验,帮助开发人员在一个视图中管理和连接资源,并轻松地将资源部署到云中。此外,我们还支持服务连接器,以帮助您跨各种 Azure 计算服务建立资源连接。更多详情,请访问此文档

Image Applicaiton centric View Experience

要使用这一新功能,首先启动 IntelliJ IDEA,在 “项目 “视图中展开 Azure 节点,然后单击 “Connect to Azure Resource”。接下来,选择资源并建立与项目的连接。如有需要,您可以为每个应用程序创建或修改一个连接。下面是一个演示。

 

在您将此 Java 项目推送到 GitHub 等远程仓库后,如果您的团队成员想要修改它,我们也支持恢复连接字符串。您的合作者可以在 IntelliJ IDEA 中拉出并打开它,然后点击 “Edit Connection” 即可轻松地重新配置它。下面是另一个演示。

Maven Plugin 提升

Azure App Service 的 Deployment Status 优化

当 Java 开发人员使用 Azure Web App Service 的 Maven 插件时,我们了解他们中的大多数人都希望在部署过程中能够更多地访问日志和部署状态。在最新版本中,我们简化了部署状态信息,更新过程更加清晰,从而增强了这种体验。这可以帮助您监控网络应用程序部署的进度和结果。将 Web 应用程序部署到 Azure 后,您还可以单击端点 URL 直接访问该应用程序。下面是一个演示。

反馈与建议

如果您感兴趣,请不要犹豫并尝试使用我们的产品吧! 您的反馈和建议对我们非常重要,将有助于我们产品的未来发展。

Image feedback new

资源

以下链接和资源能帮助您更好地了解 Java on Azure Tooling 的相关信息:

3 comments

Discussion is closed. Login to edit/delete existing comments.

  • hang yin 0

    尊敬的开发者们,你们好!
    我在尝试使用 vscode 启动一个由 maven 构建的 Multi-Module 的 Spring Boot 项目时,遇到了问题。问题的关键之处在于这些 module 属于不同的 Spring Boot 程序,但是它们都使用同一个 Java 主类来启动。
    当我使用 IntelliJ IDEA 时,我可以非常方便的启动这些服务(通过配置主类),我发现其奥秘在于 IntelliJ IDEA 会将项目依赖的所有 jar 包的路径和模块的 target/classes 路径都拼接在 classpath 中,这一做法或许有些丑陋但是非常有用。
    而我在 vscode 中却无法办到,我尝试使用 classPaths 参数指定路径和用 mainClass 参数指定主类,但是启动的过程中仍然遇到了问题。通过观察 vscode 的命令参数我发现,我在 launch.json 中配置的路径似乎并没有生效。我发现,当我使用 vscode 启动 Java 程序时,其真正的 classpath 参数(-cp)指向了 ~\AppData\Local\Temp 下的一个临时生成的 jar 包。我的配置如下所示

    “classPaths”: [
    “${workspaceFolder}/fcs-trs-service/target/classes”,
    “${workspaceFolder}/fcs-common/target/classes”,
    “$Runtime”
    ]

    Dear developers, hello! I encountered a problem while trying to launch a Spring Boot project with multiple modules, built by Maven, using vscode. The key issue lies in the fact that these modules belong to different Spring Boot applications, but they all use the same Java main class for startup.

    When using IntelliJ IDEA, I can easily start these services by configuring the main class. I found that the secret lies in the fact that IntelliJ IDEA concatenates the paths of all the project’s dependent JAR files and the module’s target/classes path into the classpath. This approach may be somewhat ugly, but it is very useful.

    However, I am unable to achieve the same result in vscode. I tried using the classPaths parameter to specify the paths and the mainClass parameter to specify the main class, but I still encountered issues during the startup process. By observing the command parameters in vscode, I noticed that the paths configured in my launch.json file seem to have no effect. I discovered that when I launch a Java program using vscode, the actual classpath parameter(-cp) points to a temporary generated JAR file located at “~\AppData\Local\Temp”.

    Here is my configuration:

    “classPaths”: [
    “${workspaceFolder}/fcs-trs-service/target/classes”,
    “${workspaceFolder}/fcs-common/target/classes”,
    “$Runtime”
    ]

    • Nick ZhuMicrosoft employee 0

      您好,方便留一个邮件地址或者来这个地址(https://github.com/microsoft/vscode-java-pack/issues) 开一个issue吗,在issue上麻烦粘贴这个blog的地址,这样方便我们帮助您解决问题,谢谢!

      • wei jack 0

        学习一下。谢谢。

Feedback usabilla icon