新增spring cloud用例
This commit is contained in:
@ -4,8 +4,8 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.heibaiying</groupId>
|
||||
<artifactId>spring-cloud-ribbon</artifactId>
|
||||
<groupId>com.heibaiying.feign</groupId>
|
||||
<artifactId>spring-cloud-feign</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
|
@ -27,13 +27,13 @@ public class ProductService implements IProductService, ApplicationListener<WebS
|
||||
|
||||
|
||||
public List<Product> queryAllProducts() {
|
||||
// 用于测试 hystrix 超时熔断
|
||||
/*用于测试 hystrix 超时熔断
|
||||
try {
|
||||
int i = new Random().nextInt(2500);
|
||||
Thread.sleep(i);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}*/
|
||||
return productList;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user