{"id":24064522,"url":"https://github.com/dfm18/java-dpi-jsr330","last_synced_at":"2026-05-02T05:09:49.655Z","repository":{"id":249902678,"uuid":"832865784","full_name":"dfm18/java-dpi-jsr330","owner":"dfm18","description":"A small example of how to use dependency injection in Java using the jakarta.inject API and the Weld SE implementation.","archived":false,"fork":false,"pushed_at":"2024-07-24T01:38:43.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T18:14:26.602Z","etag":null,"topics":["dependency-injection","design-patterns","jakartaee","java","jsr330","maven","weld-se"],"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/dfm18.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-23T22:08:57.000Z","updated_at":"2024-07-25T20:39:22.000Z","dependencies_parsed_at":"2024-07-24T03:51:44.052Z","dependency_job_id":null,"html_url":"https://github.com/dfm18/java-dpi-jsr330","commit_stats":null,"previous_names":["dfortch18/java-dpi-jsr330","dafexdev/java-dpi-jsr330","dfm18/java-dpi-jsr330"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dfm18/java-dpi-jsr330","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm18%2Fjava-dpi-jsr330","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm18%2Fjava-dpi-jsr330/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm18%2Fjava-dpi-jsr330/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm18%2Fjava-dpi-jsr330/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfm18","download_url":"https://codeload.github.com/dfm18/java-dpi-jsr330/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm18%2Fjava-dpi-jsr330/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262678645,"owners_count":23347405,"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":["dependency-injection","design-patterns","jakartaee","java","jsr330","maven","weld-se"],"created_at":"2025-01-09T10:37:25.012Z","updated_at":"2026-05-02T05:09:48.361Z","avatar_url":"https://github.com/dfm18.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java Dependency Injection JSR-330\n\n[![Java](https://img.shields.io/badge/Java-ED8B00?style=for-the-badge\u0026logo=openjdk\u0026logoColor=white)](https://www.java.com/es/)\n[![Maven](https://img.shields.io/badge/Apache_Maven-C71A36?style=for-the-badge\u0026logo=apachemaven\u0026logoColor=white)](https://maven.apache.org/)\n\nA small example of how to use dependency injection in Java using the `jakarta.inject` API and the [**Weld SE**](https://weld.cdi-spec.org/) implementation.\n\n[**Weld SE**](https://weld.cdi-spec.org/) is an implementation of CDI (Context and Dependency Injection) in Java SE. The CDI specification is based on JSR-330 for dependency injection, which allows injecting dependencies into objects without the need to explicitly create instances in the code.\n\n## Components\n\n![](./assets/java-dpi-jsr330.png)\n\n- **`HelloWorldPrinter`:** Interface that defines the `print` method to print a Hello World\n- **`HelloWorldPrinterCapitalize`:** Implementation of `HelloWorldPrinter` that prints Hello World in capitalized format.\n- **`HelloWorldPrinterUppercase`:** Implementation of `HelloWorldPrinter` that prints Hello World in uppercase format.\n- **`HelloWorldClient`:** Client that injects all implementations of `HelloWorldPrinter` and calls the `print` method of each.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfm18%2Fjava-dpi-jsr330","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfm18%2Fjava-dpi-jsr330","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfm18%2Fjava-dpi-jsr330/lists"}