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.
Loading...
Related Quiz
- How can you implement Token Enhancement to include additional information in the OAuth2 access token?
- To include additional configuration files in a Spring Boot project, the _____ property can be used.
- In a reactive Spring Boot application, _____ is used to handle back pressure in a reactive stream.
- The _____ method in Spring Boot reactive programming is used to transform the items emitted by a Publisher.
- What is the primary purpose of using TestContainers in Spring Boot?