Option A is not correct: @PropertySource is not specifically used to designate the location of the application.properties file in a Spring Boot application. In a Spring Boot application, the application.properties file is automatically loaded from the classpath by default without needing to use @PropertySource.
Option B is not entirely accurate: While you can use @PropertySource to load properties from an external property file, it allows you to load multiple key-value pairs rather than just a single property value.
Option C is not correct: @PropertySource does not designate the file directory of the application.properties file in a Spring Boot application. Again, in Spring Boot, the application.properties file is automatically loaded from the classpath by default without needing to use @PropertySource.
None are exactly correct. It is an annotation to be used in tests to specify properties files to be included. Also it overrides the standard application.properties file.
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
nesreenmhd123
3 months, 3 weeks agoTolo01
6 months agorhuanca
10 months, 1 week agozakupower
10 months, 3 weeks ago