Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

VMware 2V0-72.22 Exam - Topic 8 Question 83 Discussion

Actual exam question for VMware's 2V0-72.22 exam
Question #: 83
Topic #: 8
[All 2V0-72.22 Questions]

Which statement is true about the @PropertySource annotation? (Choose the best answer.)

Show Suggested Answer Hide Answer
Suggested Answer: D

This is true because the @PropertySource annotation provides a convenient and declarative mechanism for adding a PropertySource to Spring's Environment. A PropertySource is an abstraction for a source of name/value pairs that can be used by the Environment to resolve properties. The @PropertySource annotation can be used to load properties from an external file, such as a .properties or .yml file, and make them available to the application context.

https://docs.spring.io/spring-framework/reference/core/beans/environment.html#beans-using-propertysource


Contribute your Thoughts:

0/2000 characters
Arlene
10 days ago
I vaguely recall that @PropertySource is not just for application.properties, so C seems off to me.
upvoted 0 times
...
Vicki
15 days ago
I'm not entirely sure, but I feel like B could be misleading since it sounds too specific for what @PropertySource does.
upvoted 0 times
...
Anthony
20 days ago
I remember practicing a question like this, and I think A was mentioned as a common misconception.
upvoted 0 times
...
Brynn
25 days ago
I think @PropertySource is mainly about adding properties from external files, so maybe D is the right choice?
upvoted 0 times
...

Save Cancel