使用 Spring Cloud 访问 AWS 参数存储时重试

时间:2021-01-20 08:45:24

标签: spring-boot spring-cloud aws-ssm

在我的 springboot 应用程序中,我通过在 pom.xml 中添加以下依赖项来访问 AWS 参数存储中的参数值。

        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-aws-parameter-store-config</artifactId>

然后,通过在代码中添加适当的 bootstrap.properties 和 @Value 注释,我能够成功地从 AWS 参数存储中检索值。

我的问题是,如何在访问参数存储中的值时设置重试逻辑?有没有办法指定重试和退避的次数,以防出现瞬时连接错误?

0 个答案:

没有答案
相关问题