update: 升级以后fallback 注册成为spring bean

This commit is contained in:
wangiegie@gmail.com 2018-01-07 15:45:57 +08:00
parent e1718274f5
commit 69da9ae0b0
2 changed files with 6 additions and 0 deletions

View File

@ -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());

View File

@ -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