S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which annotation is used to define a bean in Spring Boot?

  • (A) @Component
  • (B) @Service
  • (C) @Bean
  • (D) @Repository
  • Correct Answer - Option(C)
  • Views: 12
  • Filed under category Springboot
  • Hashtags:

Explanation by: Shyam Dubey
@Bean tells Spring to instantiate and manage the returned object as a bean.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.