Home  >  Q&A  >  body text

java - Spring cloud注解@HystrixCommand正确调用到了方法,但还会是持行fallbackMethod的方法

Spring cloud注解@HystrixCommand正确调用到了方法,但还会是持行fallbackMethod的方法,请问是什么情况下会产生这种情况?

PHP中文网PHP中文网2741 days ago477

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-04-18 10:32:42

    First check if an exception is thrown inside.

    reply
    0
  • 阿神

    阿神2017-04-18 10:32:42

    Did you perform breakpoint debugging when testing this?
    If it is breakpoint debugging, it may be like this.
    Because you may not have set the timeout, resulting in a timeout error.
    hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds : 5000
    Set this and the following may be effective

    reply
    0
  • Cancelreply