添加FeignClient注释

pull/120/head
choqy 4 years ago
parent 0cdb340ad4
commit 37181a3a7c

@ -1,29 +1,31 @@
package com.ruoyi.system.api; package com.ruoyi.system.api;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.core.constant.ServiceNameConstants; import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.SysFile; import com.ruoyi.system.api.domain.SysFile;
import com.ruoyi.system.api.factory.RemoteFileFallbackFactory; import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
/** /**
* *
* *
* @author ruoyi * IP访dockerurl访
*/ * lynn.server.local IP使hosts
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class) * url = "http://lynn.server.local:9201/",
public interface RemoteFileService */
{ @FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
/** public interface RemoteFileService
* {
* /**
* @param file *
* @return *
*/ * @param file
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) * @return
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file); */
} @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
}

@ -13,10 +13,12 @@ import com.ruoyi.system.api.factory.RemoteLogFallbackFactory;
/** /**
* *
* *
* @author ruoyi * IP访dockerurl访
* lynn.server.local IP使hosts
* url = "http://lynn.server.local:9201/",
*/ */
@FeignClient(contextId = "remoteLogService", url = "http://lynn.server.local:9201/", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class) @FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteLogService public interface RemoteLogService
{ {
/** /**

Loading…
Cancel
Save