use @Component annotation instead of defining beans in XML