When https://github.com/spring-projects/spring-framework/issues/28609 is fixed we can revert the main code from commit https://github.com/spring-projects/spring-boot/commit/31b0264d94c2f5690ca18e8d2be3a8e4f75d0d15