Springboot 2.4.4 和 awsPramstore

问题描述

INFO  [2021-03-26 19:38:28.529] [main] i.a.c.p.AwsParamStorePropertySourceLocator: Loading property from AWS Parameter Store with name: /document-upload/null/,optional: false
INFO  [2021-03-26 19:38:28.560] [main] i.a.c.p.AwsParamStorePropertySourceLocator: Loading property from AWS Parameter Store with name: /document-upload/application_test/,optional: false
INFO  [2021-03-26 19:38:28.615] [main] i.a.c.p.AwsParamStorePropertySourceLocator: Loading property from AWS Parameter Store with name: /document-upload/application/,optional: false
DEBUG [2021-03-26 19:38:28.718] [main] i.a.c.p.AwsParamStorePropertySource: Populating property retrieved from AWS Parameter Store: authorization.clientId
DEBUG [2021-03-26 19:38:28.720] [main] i.a.c.p.AwsParamStorePropertySource: Populating property retrieved from AWS Parameter Store: authorization.clientSecret
DEBUG [2021-03-26 19:38:28.720] [main] i.a.c.p.AwsParamStorePropertySource: Populating property retrieved from AWS Parameter Store: management.metrics.export.influx.password
DEBUG [2021-03-26 19:38:28.720] [main] i.a.c.p.AwsParamStorePropertySource: Populating property retrieved from AWS Parameter Store: management.metrics.export.influx.user-name
DEBUG [2021-03-26 19:38:28.720] [main] i.a.c.p.AwsParamStorePropertySource: Populating property retrieved from AWS Parameter Store: scrive.token
DEBUG [2021-03-26 19:38:28.720] [main] i.a.c.p.AwsParamStorePropertySource: Populating property retrieved from AWS Parameter Store: spring.datasource.password
DEBUG [2021-03-26 19:38:28.720] [main] i.a.c.p.AwsParamStorePropertySource: Populating property retrieved from AWS Parameter Store: spring.datasource.username
INFO  [2021-03-26 19:38:28.721] [main] o.s.c.b.c.PropertySourceBootstrapConfiguration: Located property source: [BootstrapPropertySource {name='bootstrapProperties-/document-upload/null_test/'},BootstrapPropertySource {name='bootstrapProperties-/document-upload/null/'},BootstrapPropertySource {name='bootstrapProperties-/document-upload/application_test/'},BootstrapPropertySource {name='bootstrapProperties-/document-upload/application/'}]
INFO  [2021-03-26 19:38:28.837] [main] c.i.d.DocumentUploadApplication: The following profiles are active: test
WARN  [2021-03-26 19:38:32.413] [main] o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.NoSuchBeanDeFinitionException: No bean named 'aws.paramstore-io.awspring.cloud.paramstore.AwsParamStoreProperties' available
INFO  [2021-03-26 19:38:32.470] [main] o.s.b.a.l.ConditionEvaluationReportLoggingListener:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
ERROR [2021-03-26 19:38:32.570] [main] o.s.b.d.LoggingFailureAnalysisReporter:
***************************
APPLICATION Failed TO START
***************************
Description:
A component required a bean named 'aws.paramstore-io.awspring.cloud.paramstore.AwsParamStoreProperties' that Could not be found.
Action:
Consider defining a bean named 'aws.paramstore-io.awspring.cloud.paramstore.AwsParamStoreProperties' in your configuration.
About Support File a Bug Documentation Privacy Policy

为什么要我提供 AwsParamStoreProperties。 在我的 pom 中,我只将 dep 添加到 spring-cloud-starter-aws-parameter-store-config

关注https://docs.awspring.io/spring-cloud-aws/docs/2.3.0-RC1/reference/html/index.html 第 3.2 节

解决方法

请稍等。解决此问题的 PR 正在进行中:https://github.com/awspring/spring-cloud-aws/pull/102