I have been working with spring framework for many many years. However I have been used exclusively xml based configurations (i.e. spring-webapp.xml..etc). I have found the xml base configuration simple and easier to understand.
1. Traditional XML based metadata
2. Annotation-based configuration
3. Java-Based configuration
I always see the spring 2.5 annotation-based configuration as a nice add-on feature for supplementing the core xml based configuration and never take it seriously. With the introduction of spring 3.0 java-based configuration, I have a couple of questions regarding to these approaches.
1. Am I correct that both annotation-based and java-based are designed to be supplement for the core xml based configuration, but not as an replacement?
2. If the first question is "yes", then the common practice would be a hybrid of these three methods, am I correct?
3. What's the PRO(s) and CON(s) of the annotation-based and java based configurations?
4. Any scenario(s)/situation(s) that annotation-based or java based would be better options than the old xml-based configuration?