Why use @PostConstruct?
because when the constructor is called, the bean is not yet initialized – i.e. no dependencies are injected. In the @PostConstruct method the bean is fully initialized and you can use the dependencies. because this is the contract that guarantees that this method will be invoked only once in the bean lifecycle. It may happen … Read more