I am using spring retry mechanism when calling rest API. Using below annotation
@Retryable(value = Exception.class, maxAttempts = 3, backoff = @Backoff(delay = 100))
I have a java file using @Configuration which is getting properties from a properties file. Instead of passing a static value, is there a way I can pass value from the above mentioned java file.
unable to use @PropertySource("classpath:retryConfig.properties") as I am getting values from java class and not properties file.
seeing below error when trying to pass an variable
The value for annotation attribute Retryable.maxAttempts must be a constant expression