The @Service annotation in Spring Boot is a specialized form of the _____ annotation used to indicate service components.

  • @Bean
  • @Component
  • @Controller
  • @Repository
The @Service annotation in Spring Boot is a specialized form of the @Component annotation used to indicate service components. It is used to define a class as a service in the Spring application context. While @Repository is used for DAOs, @Controller is used for controllers, and @Bean is a more generic annotation for creating managed beans. The @Service annotation provides additional semantic meaning to the class.
Add your answer
Loading...

Leave a comment

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