forked from kidgrow-microservices-platform

克 刘
2020-06-12 bb1b99baff38758ac5ac8e9d2690e7257b52c17d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.kidgrow.filecenter.feign;
 
import com.kidgrow.common.constant.ServiceNameConstants;
import com.kidgrow.filecenter.feign.fallback.FileServiceFallbackFactory;
import com.kidgrow.filecenter.model.FileInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
 
/**
 * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br>
 *
 * @Description: <br>
 * @Project: <br>
 * @CreateDate: Created in 2020/2/22 14:33 <br>
 * @Author: <a href="4345453@kidgrow.com">liuke</a>
 */
@FeignClient(name = ServiceNameConstants.FILE_CENTER_SERVER, fallbackFactory = FileServiceFallbackFactory.class, decode404 = true)
public interface FileService {
    /**
     * 根据条件查询
     * @param file
     */
    @PostMapping(value = "/files-anon",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    FileInfo upload(@RequestPart("file") MultipartFile file);
}