S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which annotation is used to automatically detect and register beans from a package?

  • (A) @EnableScan
  • (B) @ComponentScan
  • (C) @ScanPackages
  • (D) @FindBeans
  • Correct Answer - Option(B)
  • Views: 9
  • Filed under category Springboot
  • Hashtags:

Explanation by: Shyam Dubey
@ComponentScan tells Spring where to look for annotated components.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.