You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spring-boot/spring-boot-project
Andy Wilkinson 30a0ccab02 Remove use of `@PostConstruct` from main code
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
4 years ago
..
spring-boot Remove use of `@PostConstruct` from main code 4 years ago
spring-boot-actuator Merge branch '2.1.x' into 2.2.x 4 years ago
spring-boot-actuator-autoconfigure Remove use of `@PostConstruct` from main code 4 years ago
spring-boot-autoconfigure Remove use of `@PostConstruct` from main code 4 years ago
spring-boot-cli Merge branch '2.1.x' into 2.2.x 4 years ago
spring-boot-dependencies Upgrade to Spring Kafka 2.3.12 4 years ago
spring-boot-devtools Try to make FileSystemWatcherTests.waitsForQuietPeriod() more robust 4 years ago
spring-boot-docs Add tip about providing as much typo info as possible in @Bean methods 4 years ago
spring-boot-parent Upgrade to Testcontainers 1.14.3 4 years ago
spring-boot-properties-migrator Merge branch '2.1.x' 5 years ago
spring-boot-starters Merge branch '2.1.x' into 2.2.x 4 years ago
spring-boot-test Simplify temp directory creation and improve diagnostics 4 years ago
spring-boot-test-autoconfigure Make it clearer that only the main DataSource bean may be replaced 4 years ago
spring-boot-tools Use overriding rather than overridden getter methods in config prop AP 4 years ago
pom.xml