{"id":18558203,"url":"https://github.com/ghillert/resource-readable-demo","last_synced_at":"2025-05-15T14:33:45.670Z","repository":{"id":141309549,"uuid":"318899157","full_name":"ghillert/resource-readable-demo","owner":"ghillert","description":"Demo - Using Micronaut's Readable","archived":false,"fork":false,"pushed_at":"2020-12-08T09:46:45.000Z","size":3647,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-17T11:44:44.425Z","etag":null,"topics":["java","micronaut","micronaut-framework"],"latest_commit_sha":null,"homepage":"","language":"Batchfile","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/ghillert.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}},"created_at":"2020-12-05T22:10:10.000Z","updated_at":"2024-02-07T07:03:34.000Z","dependencies_parsed_at":"2024-08-27T22:20:00.117Z","dependency_job_id":null,"html_url":"https://github.com/ghillert/resource-readable-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghillert%2Fresource-readable-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghillert%2Fresource-readable-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghillert%2Fresource-readable-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghillert%2Fresource-readable-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghillert","download_url":"https://codeload.github.com/ghillert/resource-readable-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254358706,"owners_count":22057959,"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","micronaut","micronaut-framework"],"created_at":"2024-11-06T21:39:10.229Z","updated_at":"2025-05-15T14:33:45.644Z","avatar_url":"https://github.com/ghillert.png","language":"Batchfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo: Loading Resources in Micronaut using Readable\n\n[![Build Status](https://github.com/ghillert/resource-readable-demo/workflows/Java%20CI%20with%20Maven/badge.svg)](https://github.com/ghillert/resource-readable-demo/actions)\n\nIn this demo I show have you can use [Micronaut's](https://micronaut.io/)\n[Readable](https://docs.micronaut.io/latest/api/io/micronaut/core/io/Readable.html)\ninterface to load resources from either the classpath, or the filesystem in an\nimplementation agnostic fashion.\n\n## How to Run\n\n```bash\ngit clone https://github.com/ghillert/resource-readable-demo.git\n./cd resource-readable-demo\n```\n\n```bash\n./mvnw mn:run\n```\n\n```bash\n./mvnw clean package\njava -jar target/resource-readable-demo-0.1.jar --images.image-file=file:/Users/hillert/Desktop/end-of-springone-2020.jpg\n```\n\nThe following 2 REST API endpoints are available:\n\n- http://localhost:8080/images/single\n- http://localhost:8080/images/random\n\nIf you like to override the property for the single image `images.image-file` and\nload an image from the file-system instead, you can do that e.g. with:\n\n```bash\njava -jar target/resource-readable-demo-0.1.jar --images.image-file=file:/my/path/to/some/awesome-image.jpg\n```\n\nor\n\n```bash\n./mvnw mn:run -Dmn.appArgs=\"--images.image-file=file:/my/path/to/some/awesome-image.jpg\"\n```\n\n## Configuration File\n\nThe main configuration of the demo is in `application.yml`:\n\n```yaml\nmicronaut:\n  application:\n    name: Micronaut Readable Demo\nimages:\n  image-file: \"classpath:images/bismarckia-nobilis.jpg\"\n  # image-file: \"file:/path/to/images/bismarckia-nobilis.jpg\"\n  other-files:\n    - \"classpath:images/bismarckia-nobilis.jpg\"\n    - \"classpath:images/bamboo.jpg\"\n    - \"classpath:images/hibiscus.jpg\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghillert%2Fresource-readable-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghillert%2Fresource-readable-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghillert%2Fresource-readable-demo/lists"}