Closed as not planned
Description
Up until spring-boot 3.3.8, and escaped backslash followed by a placeholder like:
prop1=value1
prop2=value2\\${prop1}
Was resulting prop2 resolving to:
value2\value1
Starting with spring-boot 3.4.0, the result is:
value2value1
Doubling the backslashes like this:
prop1=value1
prop2=value2\\\\${prop1}
Results in:
value2${prop1}
This is due to the escaping logic introduced in org.springframework.util.org.springframework.util.PlaceholderParser
which does two passes of PlaceholderParser.SimplePlaceholderPart.resolveRecursively(PartResolutionContext, String)
, each calling PlaceholderParser.parse(String, boolean)
in which the escaping logic is implemented.
This last method does not handle escaping the escape character, causing the issue.