Java Configuration API – Apache Commons Configuration
Apache Commons Configuration ™
Last Published: 03 Apr 2026
Version: 2.14.0
ApacheCon
Apache
Commons
Commons Configuration
About
Asking Questions
Release History
Issue Tracking
Dependency Management
Sources
Security
License
Code of Conduct
Javadoc
Javadoc Current
Javadoc Archive 2.x
Javadoc Archive 1.x
Building
User's Guide
Upgrade Guide: 1.x to 2.0
Upgrade Guide: 2.x
Runtime Dependencies
Project Documentation
Project Information
About
Summary
Team
Source Code Management
Issue Management
Mailing Lists
Maven Coordinates
Dependency Management
Dependencies
Dependency Convergence
CI Management
Distribution Management
Project Reports
Commons
License
Components
Sandbox
Dormant
General Information
Security
Volunteering
Contributing Patches
Building Components
Commons Parent POM
Commons Build Plugin
Commons Release Plugin
Site Publication
Releasing Components
Wiki
ASF
How the ASF works
Get Involved
Developer Resources
Code of Conduct
Sponsorship
Thanks
Introducing Apache Commons Configuration
The Commons Configuration software library provides a generic configuration interface which enables
a Java application to read configuration data from a variety of sources. Commons Configuration
provides typed access to single, and multi-valued configuration parameters as demonstrated
by the following code:
Double double = config.getDouble("number");
Integer integer = config.getInteger("number");
Configuration parameters may be loaded from the following sources:
Properties files
XML documents
Windows INI files
Property list files (plist)
JNDI
JDBC Datasource
System properties
Applet parameters
Servlet parameters
Configuration objects are created using configuration builders.
Different configuration sources can be mixed using a
CombinedConfigurationBuilder
and
CombinedConfiguration
. Additional sources of configuration parameters can
be created by using custom configuration objects. This customization can be achieved by
extending
AbstractConfiguration
or
AbstractHierarchicalConfiguration
The full Javadoc API documentation is available
here
Commons Configuration 1.x and 2.x
New projects should use 2.x, first released in 2016, under the Maven coordinates
org.apache.commons:commons-configuration2
The 1.x codebase no longer receives updates.
Denial of service issues that rely on loading untrusted data from configuration files,
or passing untrusted data to the API, are outside the scope of the 1.x security model
and will not be fixed. Upgrading your application from 1.x to 2.x will require at least changing import statement
code changes and possibly more, see the
migration guide for 2.0
The most recent Commons Configuration 2.x release can be downloaded from the
Apache download area
The artifacts have also been deployed to
Maven central
. Commons Configuration 1.x
artifacts are also available under their original Maven coordinates.
History
Commons Configuration started as code in Apache JServ. The JServ code was subsequently
added to
Jakarta Turbine
. After Jakarta
Turbine, this configuration interface moved to
Jakarta Velocity
and underwent various improvements. After Velocity, this code was introduced to the
Apache Commons
as
ExtendedProperties
Configuration began life in the Commons as a Sandbox component and was promoted to the
Commons Proper in late 2003.
Copyright © 2001-2026
The Apache Software Foundation
Apache Commons, Apache Commons Configuration, Apache, the Apache logo, and the Apache Commons project logos are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.