Java
本类阅读TOP10
作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站
Commons Configuration 提供一个了通用接口,它可以使应用程序通过多种途径读取配置信息。
Commons Configuration 根据实际情况来得到单个或者多个的参数值。示例代码如下:
Double double = config.getDouble("number"); Integer integer = config.getInteger("number");
配置参数可以从以下来源获取:
完整的 Configuration API 在 这里 .
Apache Jakarta Commons Configuration 最新发布版本在 这里 . 也可以在 IBiblio 获取 . The Changes Report explains all of the changes and bug fixes that have been made.
Commons Configuration 开始出现于Apache JServ的代码中. The JServ 的代码随后被加入到了Jakarta Turbine . 在Jakarta Turbine之后, 配置接口被移到Jakarta Velocity ,并进行了大量的改进. 在 Velocity之后, 代码被作为ExtendedProperties介绍到了Jakarta Commons 里。Configuration 作为沙盒组件开始出现在Commons 中, 在2003年末,被提升为 Commons 专有组件。. (正赶上Configuration的文档在升级,Last published: 05 February 2005 | Doc for 1.1RC1 ,可能会出现一些不同。)
相关软件: