Cases or the same situation can be referred to
http://blog.csdn.net/z69183787/article/details/53423304
<bean id= "Propertyconfigurerforanalysis" class= " Org.springframework.beans.factory.config.PropertyPlaceholderConfigurer ">
<property name= "Location" >
<value>classpath:/spring/include/dbQuery.properties</value>
</property>
</bean>
The classpath is a reference to the SRC directory of the file.
When multiple properties files exist, the configuration will need to use locations: (2)
<bean id= "Propertyconfigurer" class= "Org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" > <property name= "Locations" >
<list>
<value>classpath:/spring/include/jdbc-parms.properties</value>
<value>classpath:/spring/include/base-config.properties</value>
</list>
</property>
</bean>
Next we have to use multiple propertyplaceholderconfigurer to distribute the configuration, to achieve the integration of multiple projects under a number of decentralized properties files, the configuration is as follows: (3)
<bean id= "PropertyConfigurerForProject1" class= " Org.springframework.beans.factory.config.PropertyPlaceholderConfigurer ">
<property name= "Order" value= "1"/>
<property name= "Ignoreunresolvableplaceholders" value= "true"/>
<property name= "Location" >
<value>classpath:/spring/include/dbQuery.properties</value>
</property>
</bean>
<bean id= "PropertyConfigurerForProject2" class= " Org.springframework.beans.factory.config.PropertyPlaceholderConfigurer ">
<property name=" Order "value=" 2 "/>
<property name=" Ignoreunresolvableplaceholders "value=" true "/>
&nbs P <property name= "Locations" >
<list>
<value >classpath:/spring/include/jdbc-parms.properties</value>
<value> Classpath:/spring/include/base-config.properties</value>
</list>
</property>
</bean>
where the order attribute represents its load sequence, The ignoreunresolvableplaceholders is set to True
if you have configured more than one propertyplaceholderconfigurer to ignore the unresolved placeholder. This one true has been killing me for two days. Avoid the current placeholder throw an exception. To enter the next placeholder for property assignment.