initializing beans using singleton ( lazy and eager )