-
-
Notifications
You must be signed in to change notification settings - Fork 336
Open
Labels
component: secrets-managerSecrets Manager integration related issueSecrets Manager integration related issuestatus: waiting-for-feedbackWaiting for feedback from issuerWaiting for feedback from issuer
Description
Type: Bug
Component: Secrets Manager
Describe the bug
Spring Cloud version: 3.1.1
Secrets manager does not work as expected with @ConfigurationProperties("prefix")
. Given the following secret:
{
"EXAMPLE_FOO": "bar"
}
And the following ConfigurationProperties
:
@Configuration
@ConfigurationProperties("example")
@Data
public class ExampleProperties {
private String foo;
}
I expect foo
to resolve to bar
, but it resolves to null
instead.
Without specifying prefix
, the following works:
@Configuration
@ConfigurationProperties()
@Data
public class ExampleProperties {
private String exampleFoo;
}
exampleFoo
now resolves to bar
.
It is also possible to make it work by adding the following to application.properties
:
example.foo=${EXAMPLE_FOO}
Using ?prefix=example.
and the following secrets also works:
{
"FOO": "bar"
}
Sample
N/A. The description above should be enough.
Metadata
Metadata
Assignees
Labels
component: secrets-managerSecrets Manager integration related issueSecrets Manager integration related issuestatus: waiting-for-feedbackWaiting for feedback from issuerWaiting for feedback from issuer