When I access a bean from spring bean configuration file using BeanFactory like this:
public class Person { private String id,address; @Autowired pri
You have to use AnnotationConfigApplicationContext or you have to add to yor Spring.xml to activate the annotation scan.
AnnotationConfigApplicationContext