Git Product home page Git Product logo

Comments (3)

ms-xiaosnow avatar ms-xiaosnow commented on April 28, 2024 6

cause:

  1. spring-cloud-alibaba-dependencies 2.2.1.RELEASE pom didn't specify any version of "aliyun-oss-spring-boot-starter"
  2. "aliyun-oss-spring-boot-starter" use an incompatible version of "aliyun-java-sdk-core"

To fix this issue you could change your dependence as below:

<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>aliyun-oss-spring-boot-starter</artifactId>
    <version>1.0.0</version>
    <exclusions>
        <exclusion>
            <groupId>com.aliyun</groupId>
            <artifactId>aliyun-java-sdk-oss</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-core</artifactId>
    <version>4.5.7</version>
</dependency>

中文:
这玩意有坑,而且坑贼大,导致问题的主要原因:

  1. spring-cloud-alibaba的pom中没有声明指定的 aliyun-oss-spring-boot-starter 版本
  2. 指定了上述的版本之后,程序运行会报NoSuchMethodError (一看就想到了jar冲突的问题),找了一会才发现,starter中引入的alicloud-context与aliyun-java-sdk-core不兼容((lll¬ω¬),浪费了我1800s的生命)

解决方案,升级aliyun-java-sdk-core版本就好了,具体操作如下:

  1. 引入starter依赖的时候里边加上一个exclusions标签,把aliyun-java-sdk-core依赖排除掉
  2. 自己手动引入最新版本的aliyun-java-sdk-core依赖

按照上面的操作应该就万事大吉了,也不晓得后续还会不会有坑(此处严重怀疑程序猿没有测试过就把包发布到**仓库。。。)

from aliyun-spring-boot.

theonefx avatar theonefx commented on April 28, 2024 4

please use "aliyun-spring-boot-dependencies" replace of "spring-cloud-alibaba-dependencies" while import "aliyun-oss-spring-boot-starter"

from aliyun-spring-boot.

c297186864 avatar c297186864 commented on April 28, 2024
com.alibaba.cloud spring-cloud-alibaba-dependencies 2.2.1.RELEASE pom import

Cannot resolve com.alibaba.cloud:aliyun-oss-spring-boot-starter:unknown

from aliyun-spring-boot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.