@Retryable(value = Exception.class, maxAttempts = 3)
public Boolean sendMessageService(Request request){
...
}
注释中的maxAttempts 参数@Retryable
是硬编码的。我可以从application.properties
文件中读取该值吗?
就像是
@Retryable(value = Exception.class, maxAttempts = "${MAX_ATTEMPTS}")