Skip to content

spring.config.import configuration option doesn't support Spring Retry #703

Closed
@sergey-morenets

Description

@sergey-morenets

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:

  1. consulRetryInterceptor bean loaded after spring.config.import configuration had been processed
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions