|
|
@@ -2,11 +2,11 @@ package com.sckw.file.api.feign;
|
|
|
|
|
|
import com.sckw.core.web.response.HttpResult;
|
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* @author lfdc
|
|
|
* @version 1.0
|
|
|
@@ -16,9 +16,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
* @date 2023-06-06 10:06:06
|
|
|
*/
|
|
|
//name:调⽤的服务名称,和服务提供者yml⽂件中spring.application.name保持⼀致
|
|
|
-//path: 定义当前FeignClient的统一前缀
|
|
|
+//path: 定义当前FeignClient的统一前缀 ,path = "/file",url = "http://127.0.0.1:10050"
|
|
|
//url: 定义当前FeignClient调用地址
|
|
|
-@FeignClient(name = "sckw-file",path = "/file",url = "http://127.0.0.1:10050")
|
|
|
+@FeignClient(name = "sckw-file")
|
|
|
public interface FileApiFeignService {
|
|
|
|
|
|
/**
|
|
|
@@ -26,7 +26,20 @@ public interface FileApiFeignService {
|
|
|
* @param file
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping(value = "/fileFeignUpload",method = RequestMethod.POST)
|
|
|
+// @RequestMapping(value = "/file/fileFeignUpload",method = RequestMethod.POST)
|
|
|
+ @PostMapping("/file/fileFeignUpload")
|
|
|
public HttpResult fileFeignUpload(@RequestParam("file") MultipartFile file) ;
|
|
|
|
|
|
+ /**
|
|
|
+ * file-demo
|
|
|
+ * @param userName
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+// @RequestMapping(value = "/fileFeignUpload",method = RequestMethod.POST)
|
|
|
+ @GetMapping(value = "/file/fileFeignDemo")
|
|
|
+ public String fileFeignDemo(@RequestParam("userName") String userName) ;
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping(value = "/file/fileFeignDemo1",method = RequestMethod.POST)
|
|
|
+ String fileFeignDemo1( Map<String, String> map);
|
|
|
}
|