使用common-configuration读取xml,properties文件
?
转帖出处:http://blog.csdn.net/pengchua/archive/2007/12/21/1957069.aspx
http://commons.apache.org/configuration/apidocs/index.html?
Commons Configuration provides a generic configuration interface which enables a Java application to
read configuration data from a variety of sources.
PropertiesConfiguration Loads configuration values from a properties file.?
XMLConfiguration Takes values from an XML document.?
INIConfiguration Loads the values from a .ini file as used by Windows.?
PropertyListConfiguration Loads values from an OpenStep .plist file. XMLPropertyListConfiguration is
also available to read the XML variant used by Mac OS X.?
JNDIConfiguration Using a key in the JNDI tree, can retrieve values as configuration properties.?
BaseConfiguration An in-memory method of populating a Configuration object.?
HierarchicalConfiguration An in-memory Configuration object that is able to deal with complex
structured data.?
SystemConfiguration A configuration using the system properties?
ConfigurationConverter Takes a java.util.Properties or an
org.apache.commons.collections.ExtendedProperties and converts it to a Configuration object.
1.读取XML文件中内容
?
<configuration>的配置资源.properties是元素之一,他用来包含属性文件
?
?
}???
?