Question: Which property is given precedence by Spring?

  1. application properties located in an application.properties file outside the application.jar
  2. @PropertySource annotations on configuration classes
  3. profile-specific application-{profile}.properties files
  4. application properties located in an application.properties file inside the application.jar

Answer: The correct answer of the above question is Option C:profile-specific application-{profile}.properties files