Question: what is the difference between xml and java configuration for spring?
Answer: Xml configuration is very good to get a bigger picture of application but it maybe cumbersome to find some errors until runtime. In this case Spring @Configuration annotation sounds as a better choice since it let you see a bigger picture as well and also allows to validate configuration on compile time.