FileFeignClient.java
1011 Bytes
package com.bs.reception.feign;
import com.bs.common.core.domain.AjaxResult;
import com.bs.common.core.domain.FileEntity;
import com.bs.common.core.domain.model.ScreenshotRequest;
import com.bs.common.core.domain.model.ScreenshotResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
@FeignClient(name = "bs-fileservice", contextId = "ReceptionFileFeignClient", path = "/fileservice")
public interface FileFeignClient {
/**
* 文件上传
* @param file
* @return
*/
@PostMapping(value = "upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public AjaxResult<FileEntity> upload(@RequestPart("file") MultipartFile file);
}