Annotation and beans are essential parts of developing your Spring applications. They are considered the building blocks of Spring and make our code less boilerplate and maintainable.
Spring annotations are used to define the different types of beans. They are simply a form of metadata that marks our code to provide information. Conversely, beans are objects that are instantiated and created and can be injected with other beans. We will discuss more as we go through this section.
Types of annotations
Annotations in Spring are categorized into different types depending on their functionality. The following are annotations grouped into their respective categories.
Core annotations
Core annotations are used to leverage the Spring DI engine in our applications. They can be found in the org.springframework.beans.factory.annotation and org.springframework.context.annotation packages. The following is a list of core annotations:
https://www.geeksforgeeks.org/spring-bean-annotation-with-example/