PropertyPlaceholderConfigurer属性配置文件 资源文件绑定


        
            
              classpath:jdbc.properties
              classpath:db.properties
            
        
  




     classpath:jdbc.properties

 


org.springframework.beans.factory.config.PropertyPlaceholderConfigurer源码为

/**
* Set a location of a properties file to be loaded.
* 

Can point to a classic properties file or to an XML file * that follows JDK 1.5's properties XML format. */ public void setLocation(Resource location) { this.locations = new Resource[] {location}; } /** * Set locations of properties files to be loaded. *

Can point to classic properties files or to XML files * that follow JDK 1.5's properties XML format. *

Note: Properties defined in later files will override * properties defined earlier files, in case of overlapping keys. * Hence, make sure that the most specific files are the last * ones in the given list of locations. */ public void setLocations(Resource[] locations) { this.locations = locations; }



你可能感兴趣的:(properties,xml,bean,file,jdk,class)