Spring injects the bean by matching the variable name with bean name.