{"id":19614761,"url":"https://github.com/leancloud/clj-archaius","last_synced_at":"2025-04-28T01:32:17.041Z","repository":{"id":34482987,"uuid":"38422372","full_name":"leancloud/clj-archaius","owner":"leancloud","description":"A Clojure library designed to use Netflix/archaius for configuration management.","archived":false,"fork":false,"pushed_at":"2021-03-19T10:27:17.000Z","size":12,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-21T03:20:55.708Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leancloud.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}},"created_at":"2015-07-02T09:02:33.000Z","updated_at":"2021-03-19T10:26:56.000Z","dependencies_parsed_at":"2022-09-01T08:11:26.290Z","dependency_job_id":null,"html_url":"https://github.com/leancloud/clj-archaius","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancloud%2Fclj-archaius","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancloud%2Fclj-archaius/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancloud%2Fclj-archaius/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancloud%2Fclj-archaius/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leancloud","download_url":"https://codeload.github.com/leancloud/clj-archaius/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251234128,"owners_count":21556787,"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":[],"created_at":"2024-11-11T10:53:39.708Z","updated_at":"2025-04-28T01:32:16.035Z","avatar_url":"https://github.com/leancloud.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clj-archaius\n\nA Clojure library designed to use [Netflix/archaius](https://github.com/Netflix/archaius/) for configuration management.\n\n## Usage\n\nLeiningen dependency:\n\n```clj\n[cn.leancloud/clj-archaius \"0.4.1\"]\n```\n\nRequire clj-archaius in your namespace:\n\n```\n(require '[clj-archaius.core :refer :all])\n```\n\nAsume that you have a `config.properties` file in your project resource path:\n\n```properties\na=1\nb=2.0\nc=hello\\ world\n```\n\nYou can get these properties by:\n\n```clj\n(int-env :a)\n(double-env :b)\n(env :c) ;;or (string-env :c)\n```\n\nWith a default value if the property is not present:\n\n```clj\n(int-env :not-exists 100)\n```\n\nAdd a callback listener to be notified when the property is changed:\n\n```clj\n(on-int-env :a (fn [] (println \"The new :a is \" (int-env :a))))\n```\n\nSupported types and their default values as below:\n\n```\n                          'int 0\n                          'string nil\n                          'boolean false\n                          'double 0\n                          'float 0\n                          'long 0\n```\n\nAll these types have `{type}-env` function to retrieve property value and `on-{type}-env`\nfunction to add a callback listener to be notified when the property is changed.\n\n## License\n\nCopyright © 2015 dennis zhuang\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancloud%2Fclj-archaius","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleancloud%2Fclj-archaius","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancloud%2Fclj-archaius/lists"}