Skip to content
tmsdnl
Go back

Use kebab-case in Spring Boot @Value placeholders

Original post on X

Use kebab-case in Spring Boot @Value placeholders to avoid configuration-name headaches later.

For properties loaded from Config Server:

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.