-
Notifications
You must be signed in to change notification settings - Fork 369
Configuration properties compatible with Spring Boot Relaxed Binding #406
Comments
I just hit this myself on V2.1.1.RELEASE. PR seems like it would break non-kebab binding, but that does highlight the source of the problem: In ContextCredentialsAutoConfiguration, AwsCredentialsProperties has a @ConfigurationProperties annotation for "cloud.aws.credentials". IntelliJ picks this up and suggests cloud.aws.credentials.use-default-aws-credentials-chain for a property in a yaml config. It looks like registerBeanDefinitions() then does direct lookups of several properties by property names, avoiding binding and meaning only the camel case version of "cloud.aws.credentials.useDefaultAwsCredentialsChain" and other properties works. Perhaps AwsCredentialsProperties needs to be extracted then autowired into ContextCredentialsAutoConfiguration for use instead of directly querying properties? |
No. It works fine for both naming conventions.
What do you mean exactly? |
I am surprised that camel case would still work when explicitly querying snake case, since the current problem seems to be that snake case doesn't work because it's explicitly querying for camel case. :) I was thinking that if AwsCredentialsProperties was extracted, it could be configured with e.g. ConfigurationProperties and use the existing relaxed binding support without explicitly querying properties and thus be more flexible? |
With spring boot 2 all reading of environment variables should be done in lower kebab case. https://github.com/spring-projects/spring-boot/wiki/relaxed-binding-2.0#reading-properties-from-the-environment |
We just also run into this issue. Is there anything we could do to have this in the released version soon? |
…bab case to enable Spring Boot relaxed binding. Fixes spring-atticgh-406 Closes spring-atticgh-407
…bab case to enable Spring Boot relaxed binding. Fixes spring-atticgh-406 Closes spring-atticgh-407
…bab case to enable Spring Boot relaxed binding. Fixes spring-atticgh-406 Closes spring-atticgh-407
…bab case to enable Spring Boot relaxed binding. Fixes spring-attic#406 Closes spring-attic#407
…bab case to enable Spring Boot relaxed binding. Fixes spring-attic#406 Closes spring-attic#407
This is not a valid case when it comes to Spring Cloud AWS configuration, for example it's not possible to use kebab case, which is recommended for use in .properties and .yml files. Following configuration doesn't work.
A working configuration has to be in camel case, which is inconsistent with Spring Boot recommendations:
Spring Boot: 2.1.2.RELEASE
Spring Cloud AWS: 2.1.0.RELEASE (Greenwich.RELEASE)
The text was updated successfully, but these errors were encountered: