Fixes #41509

Comment From: theodorosidmar

Awesome. Thank you for the review. Here you go: https://github.com/spring-projects/spring-boot/pull/41511/commits/8e9a4825beef5d2afb7cde16e5ca0e16e14baecc

Comment From: wilkinsona

Thanks very much, @theodorosidmar, and congratulations on making your first contribution to Spring Boot.

Comment From: theodorosidmar

I should be thanking you. Thank you for your attention. Glad to contribute.

Comment From: mshima

@wilkinsona can this PR be backported to 3.3.x?

Comment From: wilkinsona

I'm afraid not. We don't backport enhancements to maintenance branches.