In this video, we are going to discuss about the @component annotation .
Spring Annotation
Spring Boot Annotation
@component
It is a marker for any Java class that Spring manages and treats as a bean with this you’re telling the Spring Framework that an instance of this class should be kept in the ApplicationContext.- @Component is a class-level annotation.
- It is used to denote a class as a Component. - It tells Spring container to create a bean automatically for a particular class.- A component is responsible for some operations. - Spring framework provides three other specific annotations to be used when marking a class as a Component.@Service
@Repository
@Controller
Негізгі бет What is @Component Annotation ? - Spring & Spring Boot Annotations Series #1
Пікірлер: 2