Closes gh-39148

Comment From: wilkinsona

Thanks for the PR, @darkmastermindz. I have edited your description as it doesn't resolve #39311. Please don't reinstate it again.

Comment From: wilkinsona

There was quite a bit more to this one than a single-line version change. We've taken care of that in https://github.com/spring-projects/spring-boot/commit/1c2a622f7fcef9ebd5cb74ade3869a3dfc3ca6af. Thanks anyway for the PR.