本页指定https://github.com/Azure/azure-sdk-for-java ,
Java 8 or later is required to use libraries under the com.azure package, for libraries under the com.microsoft.azure package Java 7 or later is required.
这是否意味着我应该添加依赖项,例如
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure</artifactId>
<version>1.31.1</version>
</dependency>
不是<groupId>com.microsoft.azure</groupId>
不再了吗?
嗯,我下载了这个示例,https://github.com/Azure-Samples/Hybrid-resources-java-manage-resource-group.git ,并更改了所有 com.microsoft.azure
至com.azure
,但没有成功...
最佳答案
azure
工件是 com.microsoft.azure
的一部分团体。因此,您应该继续使用该组。请参阅https://search.maven.org/artifact/com.microsoft.azure/azure/1.31.1/jar
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure</artifactId>
<version>1.31.1</version>
</dependency>
在com.azure
下发布的新软件包群关注new design guidelines 。
您可以找到有关所有可用软件包(旧的和新的)的更多详细信息 here .
Available packages
Each service might have a number of libraries available from each of the following categories:
- Client: New Releases
- Client: Previous Versions
- Management: New Releases
- Management: Previous Versions
Client: New Releases
New wave of packages that follow the Azure SDK Design Guidelines for Java and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features here. These libraries can be easily identified by folder, package, and namespaces names starting with
azure-
, e.g.azure-keyvault
.You can find the most up to date list of all of the new packages on our page. This list includes the most recent releases: both GA and preview.
NOTE: If you need to ensure your code is ready for production use one of the stable, non-preview libraries.
客户端:以前的版本
已提供使用的软件包的最新稳定版本 与 Azure 一起使用并可投入生产。这些库提供了类似的 新库的功能,因为它们允许您使用和 消耗现有资源并与之交互,例如:上传 一团。以前的库目录以
microsoft-azure-
开头, 例如microsoft-azure-keyvault
。他们可能不会实现 guidelines 或者具有与新版本相同的功能集。然而他们却这样做 提供更广泛的服务覆盖范围。管理:新版本一组新的管理库,遵循 [Azure SDK 设计指南
Java]( https://azure.github.io/azure-sdk/java/guidelines/ ) 现已在 公开预览。这些新库提供了更高层次的、 用于管理 Azure 资源的面向对象 API,已优化 易于使用、简洁和一致性。你可以找到列表 新包数量 on this page 。 可以找到这些新库的文档和代码示例 here
NOTE: If you need to ensure your code is ready for production use one of the stable, non-preview libraries.
管理:以前的版本有关使您能够配置和管理 Azure 资源的管理库的完整列表,
请检查 here 。 它们可能不具有与新版本相同的功能集,但它们 确实提供更广泛的服务覆盖范围。管理库可以是 由以
block 引用>azure-mgmt-
开头的命名空间标识,例如azure-mgmt-compute
有关所有 Azure SDK 版本的完整列表,请查看 this page .
关于java - 如何使用azure java sdk的 "com.azure"包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60989651/