{"id":17358766,"url":"https://github.com/tvd12/properties-file","last_synced_at":"2025-04-15T00:43:15.933Z","repository":{"id":7848308,"uuid":"54824634","full_name":"tvd12/properties-file","owner":"tvd12","description":"Supports to read properties, yaml file and map them to POJO","archived":false,"fork":false,"pushed_at":"2022-11-08T16:12:08.000Z","size":1413,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T00:43:08.694Z","etag":null,"topics":["java-properties","java-property-file","mapping","properties","yaml","yaml-mapping","yaml-parser"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tvd12.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-27T11:09:15.000Z","updated_at":"2024-02-20T06:15:20.000Z","dependencies_parsed_at":"2022-08-06T20:15:17.438Z","dependency_job_id":null,"html_url":"https://github.com/tvd12/properties-file","commit_stats":null,"previous_names":["tavandung12/properties-file"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvd12%2Fproperties-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvd12%2Fproperties-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvd12%2Fproperties-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvd12%2Fproperties-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tvd12","download_url":"https://codeload.github.com/tvd12/properties-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986271,"owners_count":21194024,"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":["java-properties","java-property-file","mapping","properties","yaml","yaml-mapping","yaml-parser"],"created_at":"2024-10-15T19:06:59.532Z","updated_at":"2025-04-15T00:43:15.915Z","avatar_url":"https://github.com/tvd12.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/tvd12/properties-file.svg?branch=master)](https://travis-ci.org/tvd12/properties-file)\n[![Coverage Status](https://coveralls.io/repos/github/tvd12/properties-file/badge.svg?branch=master)](https://coveralls.io/github/tvd12/properties-file?branch=master)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.tvd12/properties-file/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.tvd12/properties-file)\n[![Javadocs](https://www.javadoc.io/badge/com.tvd12/properties-file.svg)](https://www.javadoc.io/doc/com.tvd12/properties-file)\n\n# Synopsis \u003cimg src=\"https://github.com/tvd12/properties-file/blob/master/logo.png\" width=\"64\" /\u003e\n\nThis project support for interact with properties file\n\n# Code Example\n\n**1. Read properties file**\n\n```java\nProperties properties = new BaseFileReader()\n    .read(\"application.properties\");\n```\n\n**2. Read YAML file**\n\n\n```java\nProperties yamlProperties = new BaseFileReader()\n    .read(\"application.yaml\");\n```\n\n**3. Read properties file with profiles**\n\n```java\nProperties propertiesAlpha = new MultiFileReader(\"alpha\")\n    .read(\"application.properties\");\n```\n\n**4. Read YAML file with profiles**\n\n```java\nProperties propertiesAlpha = new MultiFileReader(\"alpha\")\n    .read(\"application.yaml\");\n```\n\n**5. Map properties or YAML file to POJO**\n\n```java\nApplicationConfig applicationConfigYaml = new PropertiesMapper()\n    .reader(new MultiFileReader(\"alpha\"))\n    .file(\"application.yaml\")\n    .map(ApplicationConfig.class);\n```\n\n**6. Use annotation to map**\n\n```java\npublic class Config {\n    @Property(\"n\")\n    private String name;\n\n    @Property(\"a\")\n    private int age;\n\n    @Property(\"m\")\n    private long money = 10;\n}\n```\n\n**7. Use variable in properties file**\n\n```properties\napp.hello=world\napp.hi=${app.hello}\n```\n\n**8. Use variable in yaml file**\n\n```yaml\napp.hello: world\napp.hi: ${app.hello}\n```\n\n# Motivation\n\nProprties and YAML are using in a lot of framework and application, so we want to create a library support to read `.propertes` and `YAML` file and map them to `POJO` if you want\n\n# Installation\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.tvd12\u003c/groupId\u003e\n    \u003cartifactId\u003eproperties-file\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.8\u003c/version\u003e\n\u003c/dependency\u003e\n```\n# API Reference\n\nhttp://www.javadoc.io/doc/com.tvd12/properties-file\n\n# Tests\n\nmvn test\n\n# Contact us\n\n- Touch us on [Facebook](https://www.facebook.com/youngmonkeys.org)\n- Ask us on [stackask.com](https://stackask.com)\n- Email to me [Dzung](mailto:itprono3@gmail.com)\n\n# License\n\n- Apache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvd12%2Fproperties-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvd12%2Fproperties-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvd12%2Fproperties-file/lists"}