在运行时从ldap动态设置hystrix命令javanica注释属性

时间:2017-08-11 16:40:58

标签: java spring configuration hystrix circuit-breaker

我想更改属性以在运行时动态更改。我如何设置它和在哪里?我想坚持我当前的配置源,而不是将其移动到某个属性文件或数据库。

@HystrixCommand(commandKey = "commandKey", fallbackMethod = "fallbackMethod", groupKey = "CacheGroupKey", commandProperties = { 
                @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "300") //MycustomconfigforthisClass.getTimeoutInMilliseconds()
})   
public Object get(Object data) {throw new RuntimeException("Lets go to fallback");}

public Object fallbackmethod(Object data) {return new Object();}

0 个答案:

没有答案