Which Spring MVC XML or Java based configuration is recommended?



I'm new in Spring MVC. Mostly I'm learning by reading various blog and example. Most of the time I encounter wearied configuration error in XML files. Where no compile error. But during runtime not much useful error. Both XML and Java based configuration is new for me.


I think Java based configuration should produce more helpful compile and runtime error. I guess all configuration should be doable by Java config. I got few questions or suggestion to proceed learning Spring MVC.




  1. What is is never / latest XML or Java config ?




  2. Is doable completely by Java config or I have to mix up both Java and XML?




  3. Can I avoid XML completely?




  4. Which configuration is recommended?




  5. Does it has any performance difference?




  6. In case I have to use XML config, how to debug or trace XML config?




Thanks in advance. Hope you will answer in details.


No comments:

Post a Comment