我正在按照https://www.baeldung.com/spring-data-cosmos-db 中的步骤将我的 spring 项目连接到 Azure cosmosDB Emulator
但是我正在运行
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.data.cosmos.CosmosClient]: Factory method 'cosmosClient' threw exception; nested exception is java.lang.NoSuchMethodError: reactor/netty/resources/ConnectionProvider.fixed(Ljava/lang/String;IJLjava/time/Duration;)Lreactor/netty/resources/ConnectionProvider; (loaded from file:/Users/yatman.wong/.m2/repository/io/projectreactor/netty/reactor-netty-core/1.0.15/reactor-netty-core-1.0.15.jar by jdk.internal.loader.ClassLoaders$AppClassLoader@b0c88fd9) called from interface com.azure.data.cosmos.internal.http.HttpClient (loaded from file:/Users/yatman.wong/.m2/repository/com/microsoft/azure/azure-cosmos/3.7.3/azure-cosmos-3.7.3.jar by jdk.internal.loader.ClassLoaders$AppClassLoader@b0c88fd9).
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
看起来像这个天蓝色依赖的一些内部依赖问题
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>spring-data-cosmosdb</artifactId>
<version>2.3.0</version>
</dependency>
我在https://github.com/yatw/SpringCosmosEmulator中建立了一个带有完整堆栈跟踪的错误演示项目
请给我一个解释,谢谢!