Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 混乱的猴子和春天的海斯特里克斯不相容?_Java_Spring_Spring Boot_Hystrix_Spring Boot Chaos Monkey - Fatal编程技术网

Java 混乱的猴子和春天的海斯特里克斯不相容?

Java 混乱的猴子和春天的海斯特里克斯不相容?,java,spring,spring-boot,hystrix,spring-boot-chaos-monkey,Java,Spring,Spring Boot,Hystrix,Spring Boot Chaos Monkey,我想用混沌猴子攻击我的微服务,我想用hystrix来对付失败。当我单独使用混沌猴子时,我的应用程序会受到攻击,但当我使用hystrix时,混沌猴子不会进行任何攻击 为什么我不能两者都用?这是版本问题吗 @springboot应用程序 @使能断路器 公共类应用程序{ 公共静态void main(字符串[]args){ SpringApplication.run(App.class,args); } } @RestController 公共类控制器{ @自动连线 私人服务; @请求映射(“/list

我想用混沌猴子攻击我的微服务,我想用hystrix来对付失败。当我单独使用混沌猴子时,我的应用程序会受到攻击,但当我使用hystrix时,混沌猴子不会进行任何攻击

为什么我不能两者都用?这是版本问题吗

@springboot应用程序
@使能断路器
公共类应用程序{
公共静态void main(字符串[]args){
SpringApplication.run(App.class,args);
}
}
@RestController
公共类控制器{
@自动连线
私人服务;
@请求映射(“/list”)
公共列表getList(){
return service.getList();
}
}
@服务
公务舱服务{
@自动连线
私人回购;
@HystrixCommand(fallbackMethod=“可靠”)
公共列表getList(){
返回repo.getList();
}
公开名单(){
返回数组。asList(“一”、“二”、“三”);
}
}
@存储库
公开回购{
公共列表getList(){
返回Arrays.asList(“Java”、“PHP”、“C++”);
}
}
应用程序属性
spring.profiles.active=混沌猴子
chaos.monkey.enabled=true
chaos.monkey.watcher.controller=false
chaos.monkey.watcher.restController=false
chaos.monkey.watcher.service=true
chaos.monkey.watcher.repository=false
混乱。猴子。攻击。延迟活动=错误
chaos.monkey.assults.exceptions active=true

您好,您找到解决方案了吗?有没有可能让我们知道您使用的是哪个版本的“混沌猴春靴”?还有,也许有帮助