First level:
@Component - it is eligible to scan and create a bean of this class (он имеет право сканировать и создавать компонент этого класса)
Next level:
Spring provides us meta annotations for the @Component. This annotation is used to identify this class as a component class, which means, it is eligible to scan and create a bean of this class.
annotation as @Service, @Repository, and @Controller.
@Service - is used to create Spring beans
@Repository - used to create Spring beans for the repositories at the DAO layer
@Controller - for MVC Get/Post methods. (@RequestMethod, @GetRequest, @PostRequest)
@Component - it is eligible to scan and create a bean of this class (он имеет право сканировать и создавать компонент этого класса)
Next level:
Spring provides us meta annotations for the @Component. This annotation is used to identify this class as a component class, which means, it is eligible to scan and create a bean of this class.
annotation as @Service, @Repository, and @Controller.
@Service - is used to create Spring beans
@Repository - used to create Spring beans for the repositories at the DAO layer
@Controller - for MVC Get/Post methods. (@RequestMethod, @GetRequest, @PostRequest)
Comments
Post a Comment