Comments (3)
cause:
- spring-cloud-alibaba-dependencies 2.2.1.RELEASE pom didn't specify any version of "aliyun-oss-spring-boot-starter"
- "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>
中文:
这玩意有坑,而且坑贼大,导致问题的主要原因:
- spring-cloud-alibaba的pom中没有声明指定的 aliyun-oss-spring-boot-starter 版本
- 指定了上述的版本之后,程序运行会报NoSuchMethodError (一看就想到了jar冲突的问题),找了一会才发现,starter中引入的alicloud-context与aliyun-java-sdk-core不兼容((lll¬ω¬),浪费了我1800s的生命)
解决方案,升级aliyun-java-sdk-core版本就好了,具体操作如下:
- 引入starter依赖的时候里边加上一个exclusions标签,把aliyun-java-sdk-core依赖排除掉
- 自己手动引入最新版本的aliyun-java-sdk-core依赖
按照上面的操作应该就万事大吉了,也不晓得后续还会不会有坑(此处严重怀疑程序猿没有测试过就把包发布到**仓库。。。)
from aliyun-spring-boot.
please use "aliyun-spring-boot-dependencies" replace of "spring-cloud-alibaba-dependencies" while import "aliyun-oss-spring-boot-starter"
from aliyun-spring-boot.
Cannot resolve com.alibaba.cloud:aliyun-oss-spring-boot-starter:unknown
from aliyun-spring-boot.
Related Issues (20)
- aliyun-oss-spring-boot-starter:unknow HOT 1
- maven dependency cannot resolve HOT 1
- [Question] throw a error HOT 4
- [Feature]Add a build to
- [ISSUE] the dingtalk qr code is expired
- [ISSUE] 实现 SmsUpMessageListener 类之后启动报错
- [ISSUE] HOT 1
- [Question]为什么我maven依赖不上文档中的地址 HOT 4
- [Question]Cannot resolve com.alibaba.cloud:aliyun-oss-spring-boot-starter:unknown HOT 1
- 没人维护啦?
- [ISSUE] 中文 README 中的群二维码已过期 HOT 2
- [ISSUE] Remember to add the version number(记得加版本号) HOT 1
- [Question] spring-cloud-starter-alicloud-sms 与aliyun-oss-spring-boot-starter 之间的区别 HOT 3
- Can't import the pom dependency HOT 1
- [ISSUE] Can't mvn clean install in openjdk
- 是否适配SpringBoot 3.0 HOT 1
- [多个阿里云账号共存配置优先级]
- 实现 SmsUpMessageListener 类之后启动报错 bug HOT 1
- aliyun-sms-spring-boot-starter 模块实现 SmsReportMessageListener 类之后启动报错,无法拉取回执消息。 HOT 1
- 无法自动注入ISmsService[ISSUE]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aliyun-spring-boot.