Spring getting bean by name or class