Can @PostConstruct method be executed after initialization of beans dependent on the one with @PostConstruct?

210 Views Asked by At

I have a spring bean with a singleton scope that performs loading of ssl certificates and some other stuff from files in a method annotated with @PostConstruct. After loading, this ssl stuff is saved to local variable.

This bean is injected to other beans that read these configurations.

Is the @PostConstruct method executed immedialtely after bean initialization before initialization of dependent beans? If it is not the case, consummers in my code can get null instead of loaded certificates.

0

There are 0 best solutions below