谷粒商城:Oss endpoint can‘t be empty.

谷粒商城单独建立gulimall-third-party配置完成后启动项目报错

 Error creating bean with name 'ossClient' defined in class path resource [com/alibaba/alicloud/context/oss/OssContextAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.aliyun.oss.OSS]: Factory method 'ossClient' threw exception; nested exception is java.lang.IllegalArgumentException: Oss endpoint can't be empty.
 ....
 Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.aliyun.oss.OSS]: Factory method 'ossClient' threw exception; nested exception is java.lang.IllegalArgumentException: Oss endpoint can't be empty.
...
Caused by: java.lang.IllegalArgumentException: Oss endpoint can't be empty.

在这里插入图片描述
可能原因:
springboot和springcloud没有改为对应版本
SpringBoot版本改为2.1.8.RELEASE
SpringCloud版本改为Greenwich.SR3
即可正常启动

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.8.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
    <java.version>1.8</java.version>
    <spring-cloud.version>Greenwich.SR3</spring-cloud.version>
</properties>
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 书香水墨 设计师:CSDN官方博客 返回首页