If you have a parent class which uses the @PostConstruct annotation and you create a child class that derives from it. Will the @PostConstruct method be called automatically each time an instance of the child class is created? since that @PostConstruct method is called each time an instance of the the parent is created.
I Know that in the child class it calls super(); for us automatically without us having to call it.
im just not sure if the @PostConstruct annotation is automatically called if that child class calls the super(); constructor.
After testing this scenario, the
@PostConstructmethod in the base class WILL automatically be called.The flow goes like this:
@PostConstructmethod