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.
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
7 months agoTolo01
9 months, 1 week agorhuanca
1 year, 1 month agozakupower
1 year, 1 month ago