@PostConstruct is a Java EE annotation used to select a method that needs to be executed after dependency injection is done to perform any initialization.
The
@PostConstruct
annotation is used on a method that needs to be executed after dependency injection is done to perform any initialization. This method MUST be invoked before the class is put into service.
This annotation is recognized by all Java EE compliant containers as well as spring.