一、该问题的重现步骤是什么?
1. 大屏Caster后端代码,修改application.yml中oss配置
2. 项目启动报错
3.
二、你期待的结果是什么?实际看到的又是什么?
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
Caster大屏后端 2.8.0 windows
四、请提供详细的错误堆栈信息,这很重要。
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'visualController' defined in file [D:\javaSpece\bbh\Caster\blade-service\blade-visual\target\classes\org\springblade\modules\visual\controller\VisualController.class]: Unsatisfied dependency expressed through constructor parameter 2; 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: {}
2021-04-15 18:36:50.855 INFO 22016 --- [ main] c.b.d.d.DynamicRoutingDataSource : dynamic-datasource start closing ....
Description:
Parameter 2 of constructor in org.springblade.modules.visual.controller.VisualController required a bean of type 'org.springblade.core.oss.OssTemplate' that could not be found.
The following candidates were found but could not be injected:
- Bean method 'aliossTemplate' in 'AliossConfiguration' not loaded because @ConditionalOnClass did not find required class 'com.aliyun.oss.OSSClient'
- Bean method 'minioTemplate' in 'MinioConfiguration' not loaded because @ConditionalOnProperty (oss.name=minio) found different value in property 'oss.name'
- Bean method 'qiniuTemplate' in 'QiniuConfiguration' not loaded because @ConditionalOnClass did not find required classes 'com.qiniu.util.Auth', 'com.qiniu.storage.UploadManager', 'com.qiniu.storage.BucketManager'
- Bean method 'tencentCosTemplate' in 'TencentCosConfiguration' not loaded because @ConditionalOnClass did not find required class 'com.qcloud.cos.COSClient'
Action:
Consider revisiting the entries above or defining a bean of type 'org.springblade.core.oss.OssTemplate' in your configuration.
五、若有更多详细信息,请在下面提供。
扫一扫访问 Blade技术社区 移动端