zoukankan      html  css  js  c++  java
  • 引入阿里云oss对象存储后renren-fast项目报错

    在引入阿里云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.大功告成

  • 相关阅读:
    桌面图标有蓝底
    创建与删除SQL约束或字段约束
    (转)ASP.NET(C#) 读取EXCEL ——另加解决日期问题
    ASP连接11种数据库的语法
    GridView 合并列、行类
    Office对应ContentType
    (解决办法)ASP.NET导出Excel,打开时提示“您尝试打开文件'XXX.xls'的格式与文件扩展名指定文件不一致
    (转)js判断只能输入数字或小数点
    vscode设置字体大小
    springsecurity+jwt实现登录
  • 原文地址:https://www.cnblogs.com/apex-wzw/p/14732617.html
Copyright © 2011-2022 走看看