(<!-- Get Properties Data source file Way one --><bean id= "Propertyconfigurer" class= " Org.springframework.beans.factory.config.PropertyPlaceholderConfigurer "> <property name= "Locations" > <list> <value>classpath:/ssh-config/spring_2.5.5/ c3p0.properties</value> </list> </property> </bean> <!-- Get Properties data source files ways two --><bean id = "Propertyconfigurer" class= "Org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" > <property name= "Location " > <value>classpath:/ssh-config/spring_2.5.5/c3p0.properties</value></ property> </bean> <!-- Get Properties data source files way three -->< context:property-placeholder location= "Classpath:/ssh-config/spring_2.5.5/c3p0.properties"/>
You can configure multiple files, 2,3 configure one.
2. After loading the configuration file, you can use ${} in the spring XML configuration file to get the value inside the configuration file.
spring$ placeholder Read configuration file value