From 69da9ae0b0391315ce9a7b9c7db4fe3d4ef75dad Mon Sep 17 00:00:00 2001 From: "wangiegie@gmail.com" Date: Sun, 7 Jan 2018 15:45:57 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=20=E5=8D=87=E7=BA=A7=E4=BB=A5?= =?UTF-8?q?=E5=90=8Efallback=20=E6=B3=A8=E5=86=8C=E6=88=90=E4=B8=BAspring?= =?UTF-8?q?=20bean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig/auth/feign/fallback/UserServiceFallbackImpl.java | 2 ++ .../pig/gateway/feign/fallback/MenuServiceFallbackImpl.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/pig-auth-service/src/main/java/com/github/pig/auth/feign/fallback/UserServiceFallbackImpl.java b/pig-auth-service/src/main/java/com/github/pig/auth/feign/fallback/UserServiceFallbackImpl.java index 62d60628..37ef77ce 100644 --- a/pig-auth-service/src/main/java/com/github/pig/auth/feign/fallback/UserServiceFallbackImpl.java +++ b/pig-auth-service/src/main/java/com/github/pig/auth/feign/fallback/UserServiceFallbackImpl.java @@ -4,12 +4,14 @@ import com.github.pig.auth.feign.UserService; import com.github.pig.common.vo.UserVo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; /** * @author lengleng * @date 2017/10/31 * 用户服务的fallback */ +@Service public class UserServiceFallbackImpl implements UserService { private Logger logger = LoggerFactory.getLogger(this.getClass()); diff --git a/pig-gateway/src/main/java/com/github/pig/gateway/feign/fallback/MenuServiceFallbackImpl.java b/pig-gateway/src/main/java/com/github/pig/gateway/feign/fallback/MenuServiceFallbackImpl.java index 5bfc8c0c..14d7e5fb 100644 --- a/pig-gateway/src/main/java/com/github/pig/gateway/feign/fallback/MenuServiceFallbackImpl.java +++ b/pig-gateway/src/main/java/com/github/pig/gateway/feign/fallback/MenuServiceFallbackImpl.java @@ -4,13 +4,17 @@ import com.github.pig.common.vo.MenuVo; import com.github.pig.gateway.feign.MenuService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; import java.util.Set; /** * @author lengleng * @date 2017/10/31 + * why add @Service when i up version ? + * https://github.com/spring-cloud/spring-cloud-netflix/issues/762 */ +@Service public class MenuServiceFallbackImpl implements MenuService { private Logger logger = LoggerFactory.getLogger(this.getClass()); @Override