Change the value of a Spring application property
MSALChange Spring application property values existing in either Properties or YAML files, and in @Value, @ConditionalOnProperty, @SpringBootTest, or @TestPropertySource annotations.
org. openrewrite. java. spring. ChangeSpringPropertyValueRequired
The name of the property key whose value is to be changed.
The new value to be used for key specified by propertyKey.
Optional
Only change the property value if it matches the configured oldValue.
Default false. If enabled, oldValue will be interpreted as a Regular Expression, and capture group contents will be available in newValue
Whether to match the propertyKey using relaxed binding rules. Default is true. Set to false to use exact matching.
mod run . --recipe= org. openrewrite. java. spring. ChangeSpringPropertyValue \
-P propertyKey= management. metrics. binders. files. enabled \
-P newValue= management. metrics. enable. process. filesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.