![annotations in java annotations in java](https://images.emojiterra.com/google/android-oreo/512px/1f3e0.png)
It is important to note that annotations do not inherently perform any action. For example, the following is a canonical use of Spring annotations: class FooService Bar bar Likewise, a field can be annotated with to inform the Spring DI framework that the field should be populated using DI. In the case of Spring, a class can be annotated with to inform the Spring Dependency Injection (DI) framework that it can be used as a candidate for DI. In most cases, an annotation provides supplementary information about a class, method, or field.
![annotations in java annotations in java](https://images.emojiterra.com/google/android-oreo/512px/1f427.png)
According to the Java Language Specification (JLS):Īnnotation is a marker which associates information with a program construct, but has no effect at run time.
![annotations in java annotations in java](https://s1.o7planning.com/en/10303/images/120707.png)