Normalize Spring properties to kebab-case

MSAL

Normalize Spring properties to use lowercase and hyphen-separated syntax. For example, changing spring.main.showBanner to spring.main.show-banner. With Spring's relaxed binding, kebab-case may be used in properties files and still be converted to configuration beans. Note, an exception to this is the case of @Value, which is match-sensitive. For example, @Value("${anExampleValue}") will not match an-example-value. Keys that name something rather than a Spring property, such as logger names, JDBC driver properties or OAuth2 client registration ids, are left unchanged. The Spring reference documentation recommends using kebab-case for properties where possible.

org.openrewrite.java.spring.PropertiesToKebabCase
mod run . --recipe=org.openrewrite.java.spring.PropertiesToKebabCase

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Normalize Spring application*.{yml,yaml} properties to kebab-case
  2. Normalize Spring application*.properties properties to kebab-case