2

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

@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();}
4

0 回答 0