You can see 2 types of auto-wiring mechanism at the same time in this project. One is using the Bean Configuration File (myService) and the other is using the annotation @controller & "context:component-scan" element (MyController).
"context:annotation-config": Activates the annotation of the beans which are already registered in the Application Context. It does not care how the beans are registered (whether by context:component-scan or by the definition in xml file configuration).
"context:component-scan": Registers the beans to the container, scans the annotations in the beans and activates them. So it does what "context:annotation-config" does and it also registers the beans with the container.