简体   繁体   English

Spring boot 2.2.4 release 不兼容 azure spring data cosmos 3.xx

[英]Spring boot 2.2.4 release is not compatible with azure spring data cosmos 3.x.x

I'm working on springboot with cosmos api,So if i use @Query that is provided by azure-spring-data-cosmos library(3.xx) with Springboot 2.5.0 able to get the results from cosmos database.我正在使用 cosmos api 开发 springboot,所以如果我使用 azure-spring-data-cosmos 库 (3.xx) 提供的 @Query 和 Springboot 2.5.0 能够从 cosmos 数据库中获取结果。 But if i use the same azure-spring-data-cosmos library(3.xx) with springboot 2.2.4 getting below exception但是如果我使用相同的 azure-spring-data-cosmos 库(3.xx)和 springboot 2.2.4 得到以下异常

Field userRepository in com.example.service.UserService required a bean of type 'com.example.repository.UserRepository' that could not be found.The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:Consider defining a bean of type 'com.example.repository.UserRepository' in your configuration.

I would highly recommend using the latest azure-spring-data-cosmos SDK version 3.19.0 - https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-spring-data-cosmos/CHANGELOG.md#3190-2022-03-10我强烈建议使用最新的 azure-spring-data-cosmos SDK 版本 3.19.0 - https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-spring- data-cosmos/CHANGELOG.md#3190-2022-03-10

Since spring boot releases one major version every 6 months, azure spring team supports last 2 versions of Spring Boot.由于 spring 引导每 6 个月发布一个主要版本,azure spring 团队支持 Spring 引导的最后两个版本。 We currently support spring boot 2.5.x and 2.6.x.我们目前支持 spring 启动 2.5.x 和 2.6.x。 You should be able to use any one of these versions of spring-boot with latest version of azure-spring-data-cosmos SDK.您应该能够将 spring-boot 的任何一个版本与最新版本的 azure-spring-data-cosmos SDK 一起使用。

The changelog points to the compatible version of spring boot which can be used with azure-spring-data-cosmos SDK.变更日志指向 spring 启动的兼容版本,可与 azure-spring-data-cosmos SDK 一起使用。

Also, spring-boot 2.2.4 is more than 2 years old at this point of time.此外,此时 spring-boot 2.2.4 已超过 2 年。 We don't support it anymore.我们不再支持它了。

Not sure which version of cosmos you are using but cosmos change log clearly mentions that 3.5.0 has spring boot support 2.4.3 & above.不确定您使用的是哪个版本的 cosmos,但 cosmos 更改日志清楚地提到3.5.0具有 spring 引导支持2.4.3及更高版本。

Please check if your cosmos version is 3.5.0 which might be causing this issue.请检查您的 cosmos 版本是否为3.5.0 ,这可能会导致此问题。

Reference link: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-spring-data-cosmos/CHANGELOG.md#350-2021-03-11参考链接: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-spring-data-cosmos/CHANGELOG.md#350-2021-03-11

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

相关问题 Azure cosmos Db Criteria query with subdocuments - java spring boot - Azure cosmos Db Criteria query with subdocuments - java spring boot Spring 使用 cosmos 托管标识启动应用程序 - Spring boot app with cosmos managed identity 如何使用 Azure Cosmos DB 将 Always Encrypted 实施到 Spring 引导应用程序中? - How to implement Always Encrypted into a Spring Boot Application using Azure Cosmos DB? Spring 引导 - Azure 如果重新生成主键,Cosmos DB 更改提要过程失败 - Spring Boot - Azure Cosmos DB Change Feed process failing if primary key is regenerated Azure spring 开机 JPA - Azure spring boot JPA spring 启动云应用程序,cosmos db findOne PropertyReferenceException - spring boot cloud app, cosmos db findOne PropertyReferenceException Azure spring 启动应用程序服务不断重启 - Azure spring boot app service keeps restarting Spring 批处理作业的 X 射线配置 - X-Ray configuration for Spring Batch Job Spring Boot 3 升级 - Tomcat HTTP 状态 404 - 在 Azure 上找不到 - Spring Boot 3 upgrade - Tomcat HTTP Status 404 - Not Found on Azure 外部化身份验证时如何在 spring 引导中获取经过身份验证的用户(天蓝色) - How to get the authenticated user in spring boot when authentication is externalized (azure)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM