首页 > 其他 > 详细

引入阿里云oss对象存储后renren-fast项目报错

时间:2021-05-05 21:28:29      阅读:201      评论:0      收藏:0      [点我收藏+]

在引入阿里云oss对象存储后启动renrenfast后台会报以下错误

Error creating bean with name ‘ossClient‘ defined in class path resource [com/alibaba/alicloud/context/oss/OssContextAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘ossClient‘ parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘spring.cloud.alicloud.oss-com.alibaba.alicloud.context.oss.OssProperties‘: Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.alibaba.alicloud.context.oss.OssProperties] from ClassLoader [sun.misc.Launcher$AppClassLoader@14dad5dc]
......
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘spring.cloud.alicloud.oss-com.alibaba.alicloud.context.oss.OssProperties‘: Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.alibaba.alicloud.context.oss.OssProperties] from ClassLoader [sun.misc.Launcher$AppClassLoader@14dad5dc]
......
Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.alibaba.alicloud.context.oss.OssProperties] from ClassLoader [sun.misc.Launcher$AppClassLoader@14dad5dc]

解决方法
1.首先把renrenfast的pom文件中的 aliyun-oss依赖注释掉
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>${aliyun.oss.version}</version>
</dependency>
2.将

src/main/java/io/renren/modules/oss/cloud/AliyunCloudStorageService.java、
src/main/java/io/renren/modules/oss/cloud/OSSFactory.java
这两个文件中的代码全部注释掉。


3.大功告成

 

引入阿里云oss对象存储后renren-fast项目报错

原文:https://www.cnblogs.com/apex-wzw/p/14732617.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!