S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which annotation is used to run code before a bean is destroyed?

  • (A) @PreDestroy
  • (B) @DestroyBean
  • (C) @BeforeShutdown
  • (D) @Shutdown
  • Correct Answer - Option(A)
  • Views: 12
  • Filed under category Springboot
  • Hashtags:

Explanation by: Shyam Dubey
@PreDestroy indicates a method to call before the bean is removed from the context.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.