qq_35763758
qq_35763758
2017-07-19 07:53

spring boot整合fastdfs 注入接口提示that could not be found

  • spring
  • fastdfs
  • jar

报错::


APPLICATION FAILED TO START


Description:

Field ffsClient in com.eharmony.iams.api.collect.ImageCollectController required a bean of type 'com.github.tobato.fastdfs.service.FastFileStorageClient' that could not be found.

Action:

Consider defining a bean of type 'com.github.tobato.fastdfs.service.FastFileStorageClient' in your configuration.

注入:
@Autowired
//@Qualifier("DefaultFastFileStorageClient")
protected FastFileStorageClient ffsClient;
//接口
public interface FastFileStorageClient extends GenerateStorageClient {}
// 实现
@Component
public class DefaultFastFileStorageClient extends DefaultGenerateStorageClient implements FastFileStorageClient {}

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答