Top Description Methods
jakarta.annotation

public @Interface PostConstruct

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:METHOD
Imports
java.lang.annotation.*

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 must be supported on all classes that support dependency injection. The method annotated with PostConstruct must be invoked even if the class does not request any resources to be injected. Only one method in a given class can be annotated with this annotation. The method on which the PostConstruct annotation is applied must fulfill all of the following criteria:
Since
1.6, Common Annotations 1.0
See Also
jakarta.annotation.PreDestroy, jakarta.annotation.Resource

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString