20 lines
598 B
Java
20 lines
598 B
Java
package com.bwie.auth.feign;
|
|
|
|
import com.bwie.common.domain.User;
|
|
import com.bwie.common.result.Result;
|
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
@Component
|
|
public class UserAuthFusing implements FallbackFactory<LoginFeignController> {
|
|
@Override
|
|
public LoginFeignController create(Throwable cause) {
|
|
return new LoginFeignController() {
|
|
@Override
|
|
public Result<User> findName(String userName) {
|
|
return Result.error("网络异常 请稍等");
|
|
}
|
|
};
|
|
}
|
|
}
|