Backport of #23715

Comment From: snicoll

Fixed by https://github.com/spring-projects/spring-boot/commit/eb77a20ea1cae4da72f4d3a86d487bee6c6a2edf