<bdo id='Ad7qW'></bdo><ul id='Ad7qW'></ul>
  1. <i id='Ad7qW'><tr id='Ad7qW'><dt id='Ad7qW'><q id='Ad7qW'><span id='Ad7qW'><b id='Ad7qW'><form id='Ad7qW'><ins id='Ad7qW'></ins><ul id='Ad7qW'></ul><sub id='Ad7qW'></sub></form><legend id='Ad7qW'></legend><bdo id='Ad7qW'><pre id='Ad7qW'><center id='Ad7qW'></center></pre></bdo></b><th id='Ad7qW'></th></span></q></dt></tr></i><div id='Ad7qW'><tfoot id='Ad7qW'></tfoot><dl id='Ad7qW'><fieldset id='Ad7qW'></fieldset></dl></div>
  2. <tfoot id='Ad7qW'></tfoot>

    <legend id='Ad7qW'><style id='Ad7qW'><dir id='Ad7qW'><q id='Ad7qW'></q></dir></style></legend>

    <small id='Ad7qW'></small><noframes id='Ad7qW'>

    1. 最新和旧版本冲突的两个 Maven 依赖关系

      时间:2024-08-23
      <tfoot id='xI8B2'></tfoot>

            <tbody id='xI8B2'></tbody>
          <i id='xI8B2'><tr id='xI8B2'><dt id='xI8B2'><q id='xI8B2'><span id='xI8B2'><b id='xI8B2'><form id='xI8B2'><ins id='xI8B2'></ins><ul id='xI8B2'></ul><sub id='xI8B2'></sub></form><legend id='xI8B2'></legend><bdo id='xI8B2'><pre id='xI8B2'><center id='xI8B2'></center></pre></bdo></b><th id='xI8B2'></th></span></q></dt></tr></i><div id='xI8B2'><tfoot id='xI8B2'></tfoot><dl id='xI8B2'><fieldset id='xI8B2'></fieldset></dl></div>
          • <bdo id='xI8B2'></bdo><ul id='xI8B2'></ul>

              <small id='xI8B2'></small><noframes id='xI8B2'>

                <legend id='xI8B2'><style id='xI8B2'><dir id='xI8B2'><q id='xI8B2'></q></dir></style></legend>
                本文介绍了最新和旧版本冲突的两个 Maven 依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 here 的 spring-data-dynamoDB 项目,根据其 pom.xml 他们使用了 1.6.9.1 版本的 aws-java-sdk,但我需要为我的项目使用最新版本的 aws-java-sdk,以便使用它的一些功能来实现 Amazon s3.如果我包含它的依赖项,

                Am using spring-data-dynamoDB project from here, as per its pom.xml they have used 1.6.9.1 version of aws-java-sdk, but I need to use latest version of aws-java-sdk for my project for using some of its features to implement Amazon s3 too. If I include its dependency,

                <dependency>
                    <groupId>com.amazonaws</groupId>
                    <artifactId>aws-java-sdk</artifactId>
                    <version>1.7.9</version>
                </dependency>
                

                我得到如下异常,

                12:51:25.298 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)': [_relProvider]
                12:51:25.307 [main] ERROR o.s.w.c.ContextLoader - Context initialization failed
                org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.hateoas.config.HypermediaSupportBeanDefinitionRegistrar$Jackson2ModuleRegisteringBeanPostProcessor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_halObjectMapper': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.fasterxml.jackson.databind.ObjectMapper]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
                    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE]
                .......
                .......
                
                Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_halObjectMapper': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.fasterxml.jackson.databind.ObjectMapper]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
                    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1076) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE]
                .......
                .......
                

                我尝试了以下排除方法,结果也一样,

                I have tried exclusions as follows and also the same result,

                <dependency>
                   <groupId>org.socialsignin</groupId>
                   <artifactId>spring-data-dynamodb</artifactId>
                   <version>1.0.0-SNAPSHOT</version>
                   <exclusions>
                      <exclusion>
                        <groupId>com.amazonaws</groupId>
                        <artifactId>aws-java-sdk</artifactId>
                      </exclusion>
                   </exclusions>
                </dependency>
                

                现在可以在我的项目中使用最新版本的 aws-java-sdk 吗?否则 spring-data-dynamoDB pom.xml 必须更新,如果只有我能够使用它还是什么?感谢 Michaellavelle 完成了这个巨大的项目.它对我完成 DynamoDB 部分有很大帮助.

                Is it possible to use latest version of aws-java-sdk in my project now?? or else spring-data-dynamoDB pom.xml have to be updated if so only I am able to use it or what?? Thanks Michaellavelle for that tremendous project. It helps me alot for completing DynamoDB part.

                推荐答案

                谢谢@user944849.问题是 aws-java-sdk 中使用的 jackson 库,它是 spring-data-rest-webmvc 中的较低版本并与之冲突,因此通过从 aws-java-sdk 中排除 jackson 库构建正确.我得到的解决方案是,

                Thanks you @user944849. The problem is jackson libs used in aws-java-sdk which is lower version as of in spring-data-rest-webmvc and conflicts with it, so by excluding jackson libs from aws-java-sdk builds correct. Solution I got is,

                <dependency>
                    <groupId>com.amazonaws</groupId>
                    <artifactId>aws-java-sdk</artifactId>
                    <version>1.7.9</version>
                    <exclusions>
                        <exclusion>
                            <artifactId>jackson-core</artifactId>
                            <groupId>com.fasterxml.jackson.core</groupId>
                        </exclusion>
                        <exclusion>
                            <artifactId>jackson-databind</artifactId>
                            <groupId>com.fasterxml.jackson.core</groupId>
                        </exclusion>
                        <exclusion>
                            <artifactId>jackson-annotations</artifactId>
                            <groupId>com.fasterxml.jackson.core</groupId>
                        </exclusion>
                    </exclusions>
                </dependency>
                

                由于声誉问题,我无法提前发布答案.这可能对像我一样坚持的其他人有用.谢谢.

                I am unable to post an answer early because of reputation. This may be useful for others who stuck as like me. Thank you.

                这篇关于最新和旧版本冲突的两个 Maven 依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何保持“in"中提供的订单Spring Data JPA 或 Hibernate 中的子句 下一篇:Spring Data Rest 将自定义端点添加到特定存储库

                相关文章

              • <legend id='C30UP'><style id='C30UP'><dir id='C30UP'><q id='C30UP'></q></dir></style></legend>

              • <i id='C30UP'><tr id='C30UP'><dt id='C30UP'><q id='C30UP'><span id='C30UP'><b id='C30UP'><form id='C30UP'><ins id='C30UP'></ins><ul id='C30UP'></ul><sub id='C30UP'></sub></form><legend id='C30UP'></legend><bdo id='C30UP'><pre id='C30UP'><center id='C30UP'></center></pre></bdo></b><th id='C30UP'></th></span></q></dt></tr></i><div id='C30UP'><tfoot id='C30UP'></tfoot><dl id='C30UP'><fieldset id='C30UP'></fieldset></dl></div>

                  <small id='C30UP'></small><noframes id='C30UP'>

                  <tfoot id='C30UP'></tfoot>
                  • <bdo id='C30UP'></bdo><ul id='C30UP'></ul>