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 88 Discussion

Which statement is true about the @PropertySource annotation? (Choose the best answer.)
D) Used to add a set of name/value pairs to the Spring Environment from an external source.
A) Used to designate the location of the application.properties file in a Spring Boot application.
B) Used to easily look up and return a single property value from some external property file.
C) Used to designate the file directory of the application.properties file in a Spring Boot application.

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

Actual exam question for VMware's 2V0-72.22 exam
Question #: 88
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
Noah
3 days ago
I agree with D. It’s about integrating external properties effectively.
upvoted 0 times
...
Jerilyn
8 days ago
I feel like A is misleading. It’s not just about the location.
upvoted 0 times
...
Jennifer
13 days ago
I think option D is the best choice. It adds properties to the Spring Environment.
upvoted 0 times
...
Charlette
19 days ago
D sounds interesting too, but I think A is the best answer here.
upvoted 0 times
...
Elizabeth
24 days ago
Wait, is it really just for the application.properties? Seems too limited.
upvoted 0 times
...
Roxanne
29 days ago
I thought it was B at first, but A is definitely right.
upvoted 0 times
...
Tamra
1 month ago
Totally agree with A! Makes sense.
upvoted 0 times
...
Dudley
1 month ago
A is correct, it points to the properties file.
upvoted 0 times
...
Colene
1 month ago
I thought @PropertySource was mainly for designating file locations, but now I'm confused about whether that's A or C.
upvoted 0 times
...
Leonor
2 months ago
I feel like option D sounds right, but I can't recall if it specifically mentions external sources.
upvoted 0 times
...
Cecilia
2 months ago
I remember practicing a question about Spring annotations, and I think @PropertySource is used to add properties to the Spring Environment.
upvoted 0 times
...
Glory
2 months ago
I think @PropertySource is related to loading properties, but I'm not sure if it's specifically for application.properties or other files too.
upvoted 0 times
...

Save Cancel