S

Shyam Dubey • 3.70K Points
Extraordinary

Q. What is the primary purpose of @Value annotation in Spring Boot?

  • (A) To create a new bean
  • (B) To enable caching
  • (C) To inject values from application.properties or environment variables
  • (D) To define application routes
  • Correct Answer - Option(C)
  • Views: 9
  • Filed under category Springboot
  • Hashtags:

Explanation by: Shyam Dubey
@Value is used to inject values from property files or environment variables into fields or methods.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.