Use kebab-case in Spring Boot @Value placeholders to avoid configuration-name headaches later.
For properties loaded from Config Server:
@Value("${demo.item-price}")matches bothdemo.item-priceanddemo.itemPrice.@Value("${demo.itemPrice}")matches onlydemo.itemPrice.
This means a camelCase placeholder is coupled to that exact property spelling. If the Config Server property is later standardized to kebab-case, the lookup breaks.
A kebab-case placeholder supports both forms, making it the safer convention for existing configuration and future changes.
Verified this behavior on Spring Boot 2.7, 3.2, 3.3, 3.5, and 4.0.