{"id":36608093,"url":"https://github.com/avaje/avaje-config","last_synced_at":"2026-06-11T16:00:25.980Z","repository":{"id":43016605,"uuid":"160593711","full_name":"avaje/avaje-config","owner":"avaje","description":"Application configuration / properties loading for JVM applications","archived":false,"fork":false,"pushed_at":"2026-05-29T05:13:19.000Z","size":736,"stargazers_count":100,"open_issues_count":3,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-29T07:15:35.939Z","etag":null,"topics":["application-configuration","avaje","dynamic-configuration","java","jvm","kotlin","properties","properties-loader","yaml"],"latest_commit_sha":null,"homepage":"https://avaje.io/config","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avaje.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-05T23:58:04.000Z","updated_at":"2026-05-29T05:13:21.000Z","dependencies_parsed_at":"2026-02-02T17:03:24.510Z","dependency_job_id":null,"html_url":"https://github.com/avaje/avaje-config","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/avaje/avaje-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avaje%2Favaje-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avaje%2Favaje-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avaje%2Favaje-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avaje%2Favaje-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avaje","download_url":"https://codeload.github.com/avaje/avaje-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avaje%2Favaje-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34206492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["application-configuration","avaje","dynamic-configuration","java","jvm","kotlin","properties","properties-loader","yaml"],"created_at":"2026-01-12T08:47:24.765Z","updated_at":"2026-06-11T16:00:25.974Z","avatar_url":"https://github.com/avaje.png","language":"Java","funding_links":[],"categories":["java"],"sub_categories":[],"readme":"![Supported JVM Versions](https://img.shields.io/badge/JVM-11+-brightgreen.svg?\u0026logo=openjdk)\n[![Discord](https://img.shields.io/discord/1074074312421683250?color=%237289da\u0026label=discord)](https://discord.gg/Qcqf9R27BR)\n[![Maven Central](https://img.shields.io/maven-central/v/io.avaje/avaje-config.svg?label=Maven%20Central)](https://mvnrepository.com/artifact/io.avaje/avaje-config)\n[![javadoc](https://javadoc.io/badge2/io.avaje/avaje-config/javadoc.svg?color=purple)](https://javadoc.io/doc/io.avaje/avaje-config/latest/io.avaje.config/io/avaje/config/package-summary.html)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/avaje/avaje-config/blob/main/LICENSE)\n[![Build](https://github.com/avaje/avaje-config/actions/workflows/build.yml/badge.svg)](https://github.com/avaje/avaje-config/actions/workflows/build.yml)\n[![native image build](https://github.com/avaje/avaje-config/actions/workflows/native-image.yml/badge.svg)](https://github.com/avaje/avaje-config/actions/workflows/native-image.yml)\n\n# [Avaje Config](https://avaje.io/config/)\n\nThis library loads properties files that can be used to configure\nan application including \"testing\" and \"local development\" and\ndynamic configuration (changes to configuration properties at runtime).\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.avaje\u003c/groupId\u003e\n  \u003cartifactId\u003eavaje-config\u003c/artifactId\u003e\n  \u003cversion\u003e${avaje.config.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Typical use\n\n- Put application.yaml into src/main/resources for properties that have reasonable defaults\n- Put application-test.yaml into src/test/resources for properties used when running tests\n- Specify external properties via command line arguments. These effectively override application.yaml properties.\n\n\n## Config use\n\nGetting property values\n```java\n\n// get a String property\nString value = Config.get(\"myapp.foo\");\n\n// with a default value\nString value = Config.get(\"myapp.foo\", \"withDefaultValue\");\n\n// also int, long and boolean with and without default values\nint intVal = Config.getInt(\"bar\");\nlong longVal = Config.getLong(\"bar\");\nboolean booleanVal = Config.getBool(\"bar\");\n\n```\nRegister callback on property change.\n```java\n\nConfig.onChange(\"myapp.foo\", newValue -\u003e {\n  // do something ...\n});\n\nConfig.onChangeInt(\"myapp.foo\", newIntValue -\u003e {\n  // do something ...\n});\n\nConfig.onChangeLong(\"myapp.foo\", newLongValue -\u003e {\n  // do something ...\n});\n\nConfig.onChangeBool(\"myapp.foo\", newBooleanValue -\u003e {\n  // do something ...\n});\n\n```\n\n## Loading properties\n\nConfig loads properties from expected locations as well as via command line arguments.\nBelow is the how it looks for configuration properties.\n\n- loads from main resources (if they exist)\n    - application.yaml\n    - application.properties\n\n- loads files from the current working directory (if they exist)\n    - application.yaml\n    - application.properties\n\n- loads via system property `props.file` or environment variable `PROPS_FILE` (if defined)\n\n- loads via system property `avaje.profiles` or environment variable `AVAJE_PROFILES` (if defined).\n\nSetting the `config.profiles` or environment variable `CONFIG_PROFILES` will cause avaje config to load the property files in the form `application-${profile}.properties` (will also work for yml/yaml files). \n\nFor example, if you set the `config.profiles` to `dev,docker` it will attempt to load `application-dev.properties` and `application-docker.properties`.\n\n- loads via `load.properties` property.\n\nWe can define a `load.properties` property which has name of property file in resource folder, or path locations for other properties/yaml files to load.\n\n`load.properties` is pretty versatile and can even be chained. For example, in your main application properties, you can have `load.properties=application-${profile:local}.properties` to load based on another property, and in the loaded properties you can add `load.properties` there to load more properties, and so on.\n\nExample application.properties:\n```\ncommon.property=value\nload.properties=application-${profile:local}.properties,path/to/prop/application-extra2.properties\n```\n\n\n- loads test resources (if they exist, nb: Test resources are only visible when running tests)\n    - application-test.properties\n    - application-test.yaml\n\n\nIf no test resources were loaded then it additionally loads from \"local dev\" and command line:\n\n- loads from \"local dev\".\n\nWe can specify an `app.name` property and then put a properties/yaml file at: `${user.home}/.localdev/{appName}.yaml`\nWe do this to set/override properties when we want to run the application locally (aka main method)\n\n- loads from command line arguments\n\nCommand line arguments starting with `-P` can specify properties/yaml files to load\n\n\nWhen properties are loaded they are merged/overlayed.\n\n### config.load.systemProperties\nIf we set `config.load.systemProperties` to true then all the properties that have been loaded are then set into system properties.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaje%2Favaje-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaje%2Favaje-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaje%2Favaje-config/lists"}