前言
SpringBoot 2.3.7 版本整合OSS,将依赖导入后启动报错。
错误信息如下:
APPLICATION FAILED TO START
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.alibaba.cloud.context.AliCloudSdk.(AliCloudSdk.java:76)…
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
整合OSS依赖导入后启动报错的原因是需要加入
<!--oss对象文件管理依赖--> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>aliyun-oss-spring-boot-starter</artifactId> <version>1.0.0</version> </dependency> <!--需要补充oss依赖--> <dependency> <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk-core</artifactId> <version>4.4.5</version> </dependency>