springcloud版本Finchley.RELEASE
springboot版本2.0.8.RELEASE
public interface DownloadService {
@RequestLine("GET")
Response downloadPdf(URI uri);
@Component
@Import(FeignClientsConfiguration.class)
class DownloadServiceImpl implements DownloadService {
private DownloadService downloadService;
@Autowired
public DownloadServiceImpl(Decoder decoder, Encoder encoder) {
downloadService = Feign.builder()
.encoder(encoder).decoder(decoder).target(Target.EmptyTarget.create(DownloadService.class));
}
@Override
public Response downloadPdf(URI uri) {
return downloadService.downloadPdf(uri);
}
}
}
网友评论