This PR is related to the issue #34779. I did what the issue suggested and deprecated DelegatingApplicationContextInitializer and DelegatingApplicationListener.

Comment From: philwebb

Thanks for the PR. We usually also add @Deprecated javadoc in the form described here. We probably want something like @deprecated since 3.2 for removal in 3.4 as property based initialization is not longer recommended.

Comment From: wilkinsona

We also use the since and forRemoval attributes on @Deprecated:

@Deprecated(since = "3.2.0", forRemoval = true)

The related test classes (DelegatingApplicationContextInitializerTests and DelegatingApplicationListenerTests) should also be marked as deprecated.

@bbulgarelli can you please run the build before submitting a pull request? These omissions show up in the failures that occur when trying to build your changes.

Comment From: bbulgarelli

@bbulgarelli can you please run the build before submitting a pull request?

Sorry about that. I tried to run it this time, but I still got warnings related to the test classes, even though I already added the deprecation annotation to both test classes. I'm not sure what I'm doing wrong.

We probably want something like @deprecated since 3.2 for removal in 3.4 as property based initialization is not longer recommended

OK. I added this to both the deprecated classes and the test classes.

Comment From: snicoll

Thanks @bbulgarelli, I've polished your contribution in 60df7e3.

Comment From: izeye

We also use the since and forRemoval attributes on @Deprecated:

@Deprecated(since = "3.2.0", forRemoval = true)

It would be nice if it's also documented in the "Deprecations" section in the wiki.

Comment From: snicoll

Thanks @izeye, I've updated the wiki.

Comment From: rishiraj88

Nice idea, @izeye