S

Shyam Dubey • 3.70K Points
Extraordinary

Q. How can you inject values from application.properties into a Spring bean?

  • (A) Using @ConfigInject
  • (B) Using @Value
  • (C) Using @Autowired
  • (D) Using @BeanValue
  • Correct Answer - Option(B)
  • Views: 12
  • Filed under category Springboot
  • Hashtags:

Explanation by: Shyam Dubey
@Value is used to inject values from property files directly into Spring-managed beans.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.