Q1. Does Spring dependency injection happen during compile time or runtime? A1. Runtime during creating an object. Q2. What is the difference between prototype scope and singleton scope? Which one is the default? A2.Singleton means single bean instance per IoC…