浏览代码

fix单体应用

Eric 1 年之前
父节点
当前提交
dff4aa9e17

+ 3 - 3
cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/client/AuthTaskFeignService.java

@@ -1,12 +1,12 @@
 package com.yonge.cooleshow.auth.api.client;
 
+import com.yonge.cooleshow.auth.api.client.fallback.AuthTaskFeignServiceFallback;
 import com.yonge.toolset.feign.config.FeignConfiguration;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 
-import com.yonge.cooleshow.auth.api.client.fallback.AuthTaskFeignServiceFallback;
-
-@FeignClient(contextId = "authTaskFeignService", name = "auth-server", configuration = { FeignConfiguration.class }, fallback = AuthTaskFeignServiceFallback.class)
+@FeignClient(contextId = "authTaskFeignService", name = "${app-config.open-feign.auth-server.name:auth-server}", url = "${app-config.open-feign.auth-server.url:}",
+		configuration = { FeignConfiguration.class }, fallback = AuthTaskFeignServiceFallback.class)
 public interface AuthTaskFeignService {
 
 	/**

+ 7 - 3
cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/client/SysUserFeignService.java

@@ -10,12 +10,16 @@ import com.yonge.toolset.utils.idcard.IdcardInfoExtractor;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
 
-import java.io.IOException;
 import java.util.List;
 
-@FeignClient(contextId = "sysUserFeignService", name = "auth-server", configuration = { FeignConfiguration.class }, fallback = SysUserFeignServiceFallback.class)
+@FeignClient(contextId = "sysUserFeignService", name = "${app-config.open-feign.auth-server.name:auth-server}", url = "${app-config.open-feign.auth-server.url:}",
+		configuration = { FeignConfiguration.class }, fallback = SysUserFeignServiceFallback.class)
 public interface SysUserFeignService {
 
 	@GetMapping(value = "user/queryUserById/{userId}")