What is Stereotype Annotations?

Stereotype Annotations:-this annotation is used when we apply a class register with application context, once the class is register with application context, its now available for dependency injection other classes.
some stereotype annotations are-
@Component: this annotation is applied on any spring managed component.it is a generic annotation.
@Service: this annotation is put on classes where we use business logic.
@Repository:– it is marked in database layer. Use on daoImpl class.
@Controller:- it is use in controller class where we handle http request.
@Restcontroller:- it is use in restfull application because this are combination of @Responsebody and @controller.

1 thought on “What is Stereotype Annotations?”

Leave a Comment

Your email address will not be published. Required fields are marked *