Backport of gh-25034

Comment From: spring-projects-issues

Fixed via b22e67066821eb89516f40c6d3e49012c1aada6f

Comment From: jhoeller

Reopened for the binary compatible breakage reported in gh-25034.

Comment From: spring-projects-issues

Fixed via 4b7890315f3884705fa7c308e615f83fe2ddef17