Tech Mahindra interview question

Spring life cycle