Set dependencies before calling the factory method for beans with factory method