What are annotations and how do they actually work for frameworks like Spring?

What are annotations in general?

Annotations can be thought of as meta-data for classes.

How does annotations works
specifically with Spring framework?

Spring uses annotations as an alternative to XML for declarative configuration. Some people don’t like XML.

Can annotations be used outside Spring
Framework or are they Framework
specific?

You need the implementation JARs to use any annotation, so if you use the annotations you are using Spring. Annotations are a general idea introduced into Java 5. You can write your own as well.

What module of Spring Framework is
widely used in Industry?

Spring Core is used by all the other modules; hence the name.

I think it is Spring MVC but why it is
the most used module, if am correct or
correct me on this ?

Absolutely incorrect. Spring MVC has lots of competitors (e.g., Struts 1 and 2, JSF, Wicket, Flex, etc.), so it’s not always the first choice for web MVC. And all apps that use Spring aren’t web apps. Spring Batch and Integration are quite popular and growing.

Leave a Comment