How to set Spring camel case property with uppercase environment variable?

The @Value annotation doesn't support relaxed bindings. Therefore you could use a class annotated with @ConfigurationProperties or you use a RelaxedPropertyResolver to get the value from the environment.


According to https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config-vs-value, it is now very possible simply with @Value as long as you use kebab-case (all lower case with dash) for the name e.g. @Value("config.refresh-rate")