S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which annotation is used to create a singleton service in Spring?

  • (A) @Singleton
  • (B) @Service
  • (C) @Bean
  • (D) @SingletonService
  • Correct Answer - Option(B)
  • Views: 19
  • Filed under category Springboot
  • Hashtags:

Explanation by: Shyam Dubey
@Service is a specialized form of @Component used to annotate service classes.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.