拓展百度云oss报错!!!!!

Blade 未结 1 197
1070830885@qq.c
1070830885@qq.c 剑圣 2024-02-23 18:12
悬赏:5

一、该问题的重现步骤是什么?

我添加了如下几个文件且没有报错,但依旧启动报错,我该怎么解决这个问题?

BaiduBosTemplate
BaiduBosConfiguration
oss.el.xml

image.png


image.png

image.png


二、你期待的结果是什么?实际看到的又是什么?


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

3.2.0.RELEASE

windows10 springboot


四、请提供详细的错误堆栈信息,这很重要。

2024-02-23 18:00:38.095  WARN 21204 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ossControllers' defined in file [E:\ideaProject\film_crew\target\classes\org\springblade\modules\system\controller\OssControllers.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springblade.core.oss.OssTemplate' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

Description:


Parameter 0 of constructor in org.springblade.modules.system.controller.OssControllers required a bean of type 'org.springblade.core.oss.OssTemplate' that could not be found.


Action:

Consider defining a bean of type 'org.springblade.core.oss.OssTemplate' in your configuration.

五、若有更多详细信息,请在下面提供。

1条回答
  • 2024-02-25 19:59

    目前已经有6个实现好的功能可以做参考,你遇到问题可以先这样:

     1. 选一个实现,比如Qiniu的,在这些类上面加上你对接百度的逻辑

     2. 先测试一下功能,配置好key后,看看能否上传

     3. 修改文件名为BaiduOssXXX

     4. 找到原来修改前的代码类,重新复制过来

     5. 这样就拓展完了

    作者追问:2024-02-26 10:35

    请问oss代码文件的执行顺序呢?捡重要的说就行,谢谢

    0 讨论(0)
提交回复