If the@Spyannotated component contains other dependencies, we can declare them during initialization. If they’re not provided during initialization, the system will use a zero-argument constructor if available.
methods, and constructors of a class. When Spring encounters the @Autowired annotation, it searches for a bean of the same type that can be injected into the component.