In reference to below issue https://github.com/watson-developer-cloud/spring-boot-starter/issues/7 . we have to change prefix to kebab-case in java files. But what if one of the dependency jar files references to a prefix in a format like @ConfigurationProperties(prefix="MY_CONFIG"). Is there a solution to this problem ?
Is there a solution to this problem ?
I assume you're using Spring Boot 2.x. It tightened up some of the rules around relaxed binding such that the use of the canonical form (kebab-case) is now required in the prefix
on @ConfigurationProperties
. (Camel case, snake case, and kebab case are all still supported in application.properties files).
The only solution is to update all @ConfigurationProperties
annotations to meet Spring Boot 2.0's requirements. In this case that'll require a change to your dependency jar. Note that a @ConfigurationProperties
annotation with a prefix in kebab-case will work with both Spring Boot 1.x and 2.x so you should not encounter any backwards compatibility problems with the change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With