一、该问题的重现步骤是什么?
1. 在smsClient 参照短信发送接口,写了文件上传的远程调用接口,执行到ossBuilder.template()时提示异常 未获取到对应的对象存储配置
2. OssEndpoint 类中的/put-file接口可以正常使用。
3.
二、你期待的结果是什么?实际看到的又是什么?
我需要在其他模块调用文件上传接口
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
4.0版本的cloud 产品。win10系统
四、请提供详细的错误堆栈信息,这很重要。
五、若有更多详细信息,请在下面提供。
feign接口声明:
feign 接口实现:
feign接口调用:
通过debug 能够看到报错是发生在,feign 接口实现的OssTemplate oss = ossBuilder.template();这行代码,提示未获取到对应的对象存储配置
重新写个方法,把租户id传进来
注入 private AliossTemplate aliyunOssTemplate; 会导致程序启动报错; 报错信息: Description: Parameter 1 of constructor in org.springblade.desk.controller.GroupChatController required a bean of type 'org.springblade.core.oss.AliossTemplate' that could not be found. Action: Consider defining a bean of type 'org.springblade.core.oss.AliossTemplate' in your configuration. 目前feign 方法可以调用,还是想采用AliossTemplate 注入的方式实现
扫一扫访问 Blade技术社区 移动端