Which annotation is used to define a bean that holds the business logic in a Spring Boot application?

  • @Bean
  • @BusinessLogic
  • @Component
  • @Service
In Spring Boot, the @Bean annotation is used to define a bean that holds business logic. When you use @Bean, you can configure and customize the creation of the bean, making it suitable for holding the application's business logic. The other annotations (@Component and @Service) are used for different purposes like component scanning and service layer, respectively.
Add your answer
Loading...

Leave a comment

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