Closed
Description
Spring Cloud Consul Config always supported Spring Retry and there's a special consulRetryInterceptor bean in RetryConfiguration class (part of ConsulAutoConfiguration class).
Spring Boot 2.4 introduced new property - spring.config.import which we can use to specify Consul Config client settings:
spring:
config:
import: "consul:localhost:8500;app"
But it seems new approach doesn't support Spring Retry by two reasons:
- consulRetryInterceptor bean loaded after spring.config.import configuration had been processed
- There's no @retryable methods in this new approach. ConsulPropertySourceLocator (which contains @retryable methods) is not used
The first issue can be resolved by creating custom high-order EnvironmentPostProcessor. But the second issue seems unsolvable for now.
Please advice on how to use Spring Retry and spring.config.import together.