Why were annotations introduced in Spring and Hibernate?
- by Chandrashekhar
I would like to know why were annotations introduced in Spring and Hibernate? For earlier versions of both the frameworks book authors were saying that if we keep configuration in xml files then it will be easier to maintain (due to decoupling) and just by changing the xml file we can re-configure the application.
If we use annotations in our project and in future we want to re-configure application then again we have to compile and build the project.
So why were these annotations introduced in these frameworks? From my point of view annotations make the apps dependent on certain framework. Isn't it true?