Replace String literal with constant
Apache 2.0Replace String literal with constant, adding import on class if needed.
org. openrewrite. java. ReplaceStringLiteralWithConstantRequired
Optional
The literal that is to be replaced. If not configured, the value of the specified constant will be used by default.
mod run . --recipe= org. openrewrite. java. ReplaceStringLiteralWithConstant \
-P fullyQualifiedConstantName= org. springframework. http. MediaType. APPLICATION_JSON_VALUEInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.