As you configured property-placeholder, any property that you have in p2.propertieswill take precedence over tags in p1.properties.
This is because the properties in the last file always take precedence.
You have a setting - this is the standard way that SysAdmins or DevOps users override the properties of your application. For example, you may have the first file, which is a classpath property file, and the second, similar to it, a file system-based property file whose values override the values in the first.
JavaDoc PropertiesLoaderSupport ( , PropertySourcesPlaceholderConfigurer) , setLocations
. , , , . , , .