I wrote a simple set of classes to show a friend about using Annotations for AOP (instead of xml config) . We couldnt get the @ComponentScan to work AND AnnotationConfigAppl
Question 2
As you said, bean scanning process was not complete, so there is no bean in context and you should not expect any bean from context, Either @Autowired
way or context.getBean
way.(Both ways return null )
Below link has more information on bean scanning(It may help)
Spring Component Scanning