mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
When running on Java 11 (where `@PostConstruct` is no longer part of the JRE) and without a dependency on jakarta-annotation-api, `@PostContruct` annotions are silently dropped. This leads to obscure and hard-to-track down changes in the behaviour of our auto-configuration as the `@PostConstruct`-annotated methods are not invoked. To allow users to run on Java 11 without having jakarta-annotation-api on the classpath, this commit removes use of `@PostConstruct` from main code. A Checkstyle rule has also been added to prevent its usage in main code from being reintroduced. Closes gh-23723 |
||
---|---|---|
.. | ||
checkstyle-header.txt | ||
checkstyle-suppressions.xml | ||
checkstyle.xml | ||
import-control.xml | ||
nohttp-checkstyle-suppressions.xml | ||
nohttp-checkstyle.xml | ||
nohttp-whitelist.txt |