Why Spring uses Annotations ?

Why Spring uses annotations or prefer annotations over configurations of XML. In the primitive stages of Spring, most of the configurations were XML based. But, the problem is, as the project grows or the codes grow, navigating through a endless maze of XML codes become a headache for the developers.
So, some of the developers started to solve this navigating through XML problem, and that’s how annotations born.Via annotations, wire the beans in their Spring-enabled applications. Now, Spring has several, annotations based configuration options, you can easily use.

The major annotation based configurations are the following:

  • Context Configuration Annotations
  • Stereotyping Annotations
  • Spring MVC Annotations
  • Transaction Annotations
  • JMX Annotations
  • Aspect Annotations
  • JSR-250 Annotations
  • Testing Annotations

So, now you know Why Spring uses Annotations, right ?
In the following posts, i will explain each annotation option configurations with an example.