发布于 2016-08-22 04:18:59 | 169 次阅读 | 评论: 0 | 来源: 网友投递
Commons Configuration Java 配置文件读写
Commons Configuration是一个java应用程序的配置管理类库。可以从properties或者xml文件中加载软件的配置信息,用来构建支撑软件运 行的基础环境。在一些配置文件较多较的复杂的情况下,使用该配置工具比较可以简化配置文件的解析和管理。也提高了开发效率和软件的可维护性。
Apache Commons Configuration 2.1 发布了,该版本是 Apache Commons Configuration 2.x 的首个维护版,修复了一些 bug,也提供了一些新功能,例如对于 Spring 框架更好的整合。要注意的是,这个组件需要在 Java 1.6 或更高的版本上使用。
该版本更新如下:
New Features
CONFIGURATION-636
PropertiesConfigurationLayout now allows manipulating the order of keys when the properties file is written.
CONFIGURATION-624
Support Commons Configuration as PropertySource in Spring.
Fixed Bugs
CONFIGURATION-634
HomeDirectoryLocationStrategy now works correctly in the mode that evaluates the FileLocator's base path.
CONFIGURATION-633
Interpolation was improved to better support properties with multiple values.
CONFIGURATION-632
The methods getStringArray() and getList() of CompositeConfiguration now support the interpolation of variables that reference properties with multiple values.
CONFIGURATION-622
Fixed a problem in INIConfiguration.write() with keys containing a separator character. This separator had been duplicated. Such keys are now handled correctly when the configuration is saved.
Other changes
CONFIGURATION-628
Support for the ant build was dropped.
CONFIGURATION-626
ImmutableConfiguration.getArray() has been deprecated. Arrays can now be queried using the generic get() method in a type-safe way.
CONFIGURATION-631
Updated optional dependency to Apache Commons VFS from 2.0 to 2.1. (The older version still works.)
CONFIGURATION-635
Updated optional dependency to Apache Commons Codec from 1.9 to 1.10. (The older version still works.)
查看官方更新说明以了解更多:http://www.apache.org/dist/commons/configuration/RELEASE-NOTES.txt
下载地址:http://commons.apache.org/proper/commons-configuration/download_configuration.cgi
主页:http://www.apache.org/dist/commons/configuration/