{"id":18813727,"url":"https://github.com/authme/configme","last_synced_at":"2025-04-06T22:09:07.127Z","repository":{"id":9649473,"uuid":"62890802","full_name":"AuthMe/ConfigMe","owner":"AuthMe","description":"A simple configuration management library for any Java project!","archived":false,"fork":false,"pushed_at":"2025-03-17T05:27:20.000Z","size":1404,"stargazers_count":37,"open_issues_count":48,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T21:07:02.521Z","etag":null,"topics":["config-management","configme","configuration","configuration-management","java","properties","properties-loader","settings-storage","yaml-configuration","yaml-exporter"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AuthMe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-08T13:30:30.000Z","updated_at":"2024-10-18T18:18:42.000Z","dependencies_parsed_at":"2023-02-16T15:40:52.227Z","dependency_job_id":"5ed20a04-f3c4-4e01-af5b-966a68fde2b3","html_url":"https://github.com/AuthMe/ConfigMe","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AuthMe%2FConfigMe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AuthMe%2FConfigMe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AuthMe%2FConfigMe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AuthMe%2FConfigMe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AuthMe","download_url":"https://codeload.github.com/AuthMe/ConfigMe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557767,"owners_count":20958047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config-management","configme","configuration","configuration-management","java","properties","properties-loader","settings-storage","yaml-configuration","yaml-exporter"],"created_at":"2024-11-07T23:38:20.340Z","updated_at":"2025-04-06T22:09:07.108Z","avatar_url":"https://github.com/AuthMe.png","language":"Java","readme":"# ConfigMe\n[![Build Status](https://github.com/AuthMe/ConfigMe/actions/workflows/maven_jdk8.yml/badge.svg)](https://github.com/AuthMe/ConfigMe/actions?query=branch%3Amaster)\n[![Coverage Status](https://coveralls.io/repos/github/AuthMe/ConfigMe/badge.svg?branch=master)](https://coveralls.io/github/AuthMe/ConfigMe?branch=master)\n[![Javadocs](https://www.javadoc.io/badge/ch.jalu/configme.svg)](https://www.javadoc.io/doc/ch.jalu/configme)\n[![Code Climate](https://codeclimate.com/github/AuthMe/ConfigMe/badges/gpa.svg)](https://codeclimate.com/github/AuthMe/ConfigMe)\n\nA simple configuration management library with YAML support out of the box.\n\n- Lightweight\n- Flexible\n- Out of the box support for YAML\n- Allows migrations / config file checks\n- Null-safe\n- Unit testing friendly\n\n## How it works\n- Each configurable value is a `Property` in ConfigMe. Properties are declared as `public static final` fields\n  in classes which implement the `SettingsHolder` interface.\n- Configurations are read from a `PropertyResource` (e.g. the provided `YamlFileResource`), which abstracts reading\n  and writing.\n- The _property resource_ may be checked for completeness with the `MigrationService`, which allows you also to rename\n  properties or to remove obsolete ones.\n- The `SettingsManager` unifies the members above. On creation, it calls the migration service and allows you to get\n  and change property values.\n\n### Integration\nStart using ConfigMe by adding this to your pom.xml:\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ech.jalu\u003c/groupId\u003e\n        \u003cartifactId\u003econfigme\u003c/artifactId\u003e\n        \u003cversion\u003e1.4.1\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n  \n### Example\n**config.yml**\n```yml\ntitle:\n    text: 'Hello'\n    size: 12\n```\n\n**TitleConfig.java**\n```java\npublic class TitleConfig implements SettingsHolder {\n\n    public static final Property\u003cString\u003e TITLE_TEXT =\n        newProperty(\"title.text\", \"-Default-\");\n\n    public static final Property\u003cInteger\u003e TITLE_SIZE =\n        newProperty(\"title.size\", 10);\n\n    private TitleConfig() {\n        // prevent instantiation\n    }\n}\n```\n\n**WelcomeWriter.java**\n```java\npublic class WelcomeWriter {\n    public String generateWelcomeMessage() {\n        SettingsManager settings = SettingsManagerBuilder\n            .withYamlFile(Path.of(\"config.yml\"))\n            .configurationData(TitleConfig.class)\n            .useDefaultMigrationService()\n            .create();\n\n        // Get properties from the settings manager\n        return \"\u003cfont size=\\\"\"\n            + settings.getProperty(TitleConfig.TITLE_SIZE) + \"\\\"\u003e\"\n            + settings.getProperty(TitleConfig.TITLE_TEXT) + \"\u003c/font\u003e\";\n    }\n}\n```\n:pencil: Read the full documentation in the [ConfigMe Wiki](https://github.com/AuthMe/ConfigMe/wiki).\n\n:pencil: See a full working example based on this\n[here](https://github.com/AuthMe/ConfigMe/tree/master/src/test/java/ch/jalu/configme/demo).\n\n:pencil: See how to use custom classes as property types in the\n[bean properties demo](https://github.com/AuthMe/ConfigMe/tree/master/src/test/java/ch/jalu/configme/demo/beans).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthme%2Fconfigme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthme%2Fconfigme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthme%2Fconfigme/lists"}