https://github.com/teragrep/cnf_02
Teragrep Configuration Wrapper for com.typesafe.config
https://github.com/teragrep/cnf_02
config configuration java-library library teragrep typesafe-config
Last synced: 28 days ago
JSON representation
Teragrep Configuration Wrapper for com.typesafe.config
- Host: GitHub
- URL: https://github.com/teragrep/cnf_02
- Owner: teragrep
- License: agpl-3.0
- Created: 2024-11-18T13:34:13.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-08T07:19:29.000Z (about 1 month ago)
- Last Synced: 2025-04-08T08:27:52.231Z (about 1 month ago)
- Topics: config, configuration, java-library, library, teragrep, typesafe-config
- Language: Java
- Homepage: https://teragrep.com
- Size: 47.9 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
// Before publishing your new repository:
// 1. Write the readme file
// 2. Update the issues link in Contributing section in the readme file
// 3. Update the discussion link in config.yml file in .github/ISSUE_TEMPLATE directory= Teragrep Configuration Wrapper for Typesafe Config
// Add a short description of your project. Tell what your project does and what it's used for.
CNF-02 is a library that provides immutable configuration for Typesafe Config for projects using Java. Typesafe Config will be converted to https://github.com/teragrep/cnf_01[CNF-01]'s Configuration interface, so it is wise to read through its documentation as well. CNF-02 has CNF-01 as a dependency, so it provides all the functionality that it has.
The goal is to have CNF-02 as an extension of CNF-01 with the added third party dependency of Typesafe Config. This ensures that if a project does not use Typesafe for configuration, it doesn't have to be added as a dependency when migrating to use the CNF-01 library.
== Features
// List your project's features
- Converts Typesafe Config to CNF-01 interface.
- Provides all functionalities from CNF-01 with a transitive dependency to the component.== Limitations
CNF-01's interface converts to a String to String map of configurations. For this reason, Lists used in Typesafe Config are represented as Strings. The resulting List Strings are in Json format and can be parsed with Jakarta or Gson for example.
Maps are represented individually as key-value pairs like in Typesafe Config.
Null values are not supported. Keys that have null values are not present in the resulting Map.
== How to Implement
See https://github.com/teragrep/cnf_01[CNF-01's documentation] for instructions on implementation.
== How to Use
// add instructions how people can start to use your project
See https://github.com/teragrep/cnf_01[CNF-01's documentation] for using the library.Example for using `TypesafeConfiguration`:
[,java]
----
// One way of initializing Typesafe Config
Config config = ConfigFactory.parseFile("file/path");// Converting Config to CNF-01 Map.
Configuration configuration = new TypesafeConfiguration(config);
Map configurationMap = configuration.asMap();
----== Contributing
// Change the repository name in the issues link to match with your project's name
You can involve yourself with our project by https://github.com/teragrep/cnf_02/issues/new/choose[opening an issue] or submitting a pull request.
Contribution requirements:
. *All changes must be accompanied by a new or changed test.* If you think testing is not required in your pull request, include a sufficient explanation as why you think so.
. Security checks must pass
. Pull requests must align with the principles and http://www.extremeprogramming.org/values.html[values] of extreme programming.
. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).Read more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline].
=== Contributor License Agreement
Contributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[Teragrep Contributor License Agreement] before a pull request is accepted to organization's repositories.
You need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep's repositories.