package com.kidgrow.filecenter.feign.fallback; import com.kidgrow.filecenter.feign.FileService; import com.kidgrow.filecenter.model.FileInfo; import feign.hystrix.FallbackFactory; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; /** * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020
* * @Description:
* @Project:
* @CreateDate: Created in 2020/2/22 14:33
* @Author: liuke */ @Slf4j @Component public class FileServiceFallbackFactory implements FallbackFactory { @Override public FileService create(Throwable throwable) { return new FileService() { @Override public FileInfo upload(@RequestParam("file") MultipartFile file) { return null; } @Override public FileInfo feignUpload(MultipartFile file) { return null; } }; } }