AWS Parameter Store Values Not Recognized in Spring Boot Application with @ConfigurationProperties

245 views Asked by At

I have a following class in one of the spring boot application.

@ConfigurationProperties(prefix = "authorizepartner")
@Component
@Data
public class EnabledClientNameForAuthorize {
  private List<String> enabledClientName;
}

in application.properties file I have given authorizepartner.enabledclientname=ABC

We are using the AWS Parameter store to override the properties configured in this file.

In the parameter store I have tried with following configuration but its seems not getting considered.

"authorizepartner.enabledClientName":"ABC,XYZ"
"authorizepartner.enabledclientname":"ABC,XYZ"

Things are working fine if I use @Value such as below and override it in the AWS parameter store.

@Value("${valid.productIds}")
private Set<String> validProductIds;

To override valid.productIds given in application.properties we are simply putting below in parameter store and its working fine.

"valid.productIds": "PQR,ASDF" 
0

There are 0 answers