As you probably know, component-scanning is for auto-detection of classes that should be registered into the container.
In addition to auto-detection, you also have the 1) XML and 2)
java config, style of declaring beans.
Regarding which one you choose is based on your own preference. You can use all of them at the same time too.