We should port https://github.com/spring-projects/spring-boot/commit/f4c8668afdaaf032d1262a0321222e10858e3ebe#diff-a62f4ec11712ff4a03d4997660a9dc04