Hi Felipe,
Currently there are 3 possible approaches to configure your Spring applications: XML, annotations,
Java code. The preferred one has been XML for large enterprise applications because it provides an overall structure of the application. But now many developers prefer Java-based configuration (with bare minimum XML) because it is more natural and strongly typed. In the end, all approaches have their pros and cons. I'd recommend that
you should pick one of the approaches that you feel comfortable with and follow it consistently throughout your application. Mixing different approaches can make it very difficult for anyone to understand your application.
regards,
ashish