Stereotype Annotations
Learn Stereotype Annotations (Spring Framework Fundamentals, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
One Annotation, One Job @Component marks a class as a candidate for the container. It means: when you scan, register this class as a bean. That is the whole contract. It takes no dependencies, changes no behaviour and adds no capability - it is a marker that component scanning looks for.