problem with spring boot 2.x kebab-case format

Viewed 11280
2 Answers

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.

Related