增加 README.md 用例
This commit is contained in:
@ -9,11 +9,12 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : heibaiying
|
||||
* @description : 定义发生错误时候的熔断处理。除了继承自CProductFeign,还需要用@Component声明为spring的组件
|
||||
* @description : 定义发生熔断时候的回退处理。除了继承自CProductFeign,还需要用@Component声明为spring的组件
|
||||
*/
|
||||
@Component
|
||||
public class CProductFeignImpl implements CProductFeign {
|
||||
|
||||
// 发生熔断时候,返回空集合,前端页面会做容错显示
|
||||
@Override
|
||||
public List<Product> productList() {
|
||||
return new ArrayList<>();
|
||||
|
Reference in New Issue
Block a user