Because of the recent CVEs in SnakeYAML, many projects need to bump snake-yaml version to 2.0 or higher. But some deprecated codes in 1.33 have been removed in 2.0 which blocks the upgrade. This PR is about one of them which is used in Spring Boot 2.7.x source code.

This is essentially the same change as this commit in 3.0 source but without dependency upgrade.

Comment From: wilkinsona

Thanks for the PR. Your fork appears to be a little bit out of date. This has already been fixed in #34405.