There are three major components of class in Java.
Read moreWhat is the use of @component in Java?
@Component is an annotation that allows Spring to automatically detect our custom beans . In other words, without having to write any explicit code, Spring will: Scan our application for classes annotated with @Component. Instantiate them and inject any specified dependencies into them.
Read moreHow do you create a component in Java?
Steps for Creating a Custom Component
Read more