Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.


Contributors GitHub Workflow Status Coverage License Maven Central Javadoc

The modular, multi-format configuration framework for Java applications.


Confectory is a modular framework designed to hide the complexity of handling multiple configuration files for Java applications in general, providing a reliable and fast API for parsing data from different sources (file or URL) in a variety of formats, and allowing data access using a unified query language.

Overview diagram


  • Easy configuration setup via intuitive API
  • Simple data query using JSONPath, XPath, or user-defined beans
  • Support for the best providers available in the community (e.g.: Jackson, GSON)
  • Multiple configuration formats (e.g.: XML, JSON, or YAML) with custom precedence levels
  • Lazy loading of configuration sources


1. Load data from a local Properties file in the classpath:

Configuration<Properties> config = Configuration.<Properties>builder()
        .mapper(new PropertiesMapper())

Then access document data using one of the getter methods, using keys:


2. Load data from a JSON document in a Web server:

Configuration<JSONObject> config = Configuration.<JSONObject>builder()
        .mapper(new JSONObjectMapper())

Then access document data using JSONPath expressions:


ℹ️ Find more examples in the wiki.

How to include it

Confectory was designed to work with the lowest-possible number of transitive dependencies. So, we offer separate modules that can be selected according to the client needs, optimizing your application:

Module Providers Properties XML JSON YAML TOML
confectory-core Java + json-smart
confectory-datamapper-gson Google Gson
confectory-datamapper-jackson2-json Jackson 2
confectory-datamapper-jackson2-toml Jackson 2
confectory-datamapper-jackson2-xml Jackson 2
confectory-datamapper-jackson2-yaml Jackson 2
confectory-datamapper-snakeyaml SnakeYAML


If you want to contribute to the Confectory project, check the issues page, or write an e-mail to

Confectory uses GitHub Actions for CI/CD.

The Confectory logo and the file-factory animation were created with Inkscape and Natron, both free and open-source Software tools.