{"id":37017157,"url":"https://github.com/tinosteinort/beanrepository","last_synced_at":"2026-01-14T01:57:56.903Z","repository":{"id":57723657,"uuid":"64245400","full_name":"tinosteinort/beanrepository","owner":"tinosteinort","description":"A Dependency Injection / Service Locator Library","archived":false,"fork":false,"pushed_at":"2018-12-01T20:43:41.000Z","size":173,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-30T09:18:35.498Z","etag":null,"topics":["bean","beanrepository","constructor-injection","dependency-injection","prototype","singleton"],"latest_commit_sha":null,"homepage":"","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/tinosteinort.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":"2016-07-26T18:36:39.000Z","updated_at":"2019-05-06T17:49:19.000Z","dependencies_parsed_at":"2022-09-14T01:25:25.653Z","dependency_job_id":null,"html_url":"https://github.com/tinosteinort/beanrepository","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tinosteinort/beanrepository","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinosteinort%2Fbeanrepository","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinosteinort%2Fbeanrepository/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinosteinort%2Fbeanrepository/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinosteinort%2Fbeanrepository/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinosteinort","download_url":"https://codeload.github.com/tinosteinort/beanrepository/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinosteinort%2Fbeanrepository/sbom","scorecard":{"id":887240,"data":{"date":"2025-08-11","repo":{"name":"github.com/tinosteinort/beanrepository","commit":"4131d1e380ebc511392f3bda9d0966997bb34a62"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T10:28:41.701Z","repository_id":57723657,"created_at":"2025-08-24T10:28:41.701Z","updated_at":"2025-08-24T10:28:41.701Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"ssl_error","status_checked_at":"2026-01-14T01:40:32.775Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bean","beanrepository","constructor-injection","dependency-injection","prototype","singleton"],"created_at":"2026-01-14T01:57:56.287Z","updated_at":"2026-01-14T01:57:56.896Z","avatar_url":"https://github.com/tinosteinort.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"BeanRepository - Dependency Injection / Service Locator\n=======================================================\n\nThis framework is the implementation of a mix of the Service Locator Pattern and a\n the Dependency Injection Pattern. These patterns are described by Martin Fowler in\n [this article](http://martinfowler.com/articles/injection.html). The `BeanRepository`\n does not use reflection for injecting beans. Because of that fact, it can be used in\n the Java sandbox, where reflection is not allowed.\n\n\n## Features ##\n\n* simple, self-explanatory and failsafe configuration in Java code\n* no use of reflection or annotations\n* constructor injection\n* support for singletons, prototypes and instances\n* provider\n* factories\n* aliases for beans\n* fail fast on start up\n* execute code after initialisation of the bean (post construct)\n* configurable if singletons are lazy initialised or not\n* detect beans of a specific type\n* modularity possible\n\n\n## Limitations ##\n\n* cyclic references not supported directly. But if needed, see\n   [CyclicReferenceExampleApp](/src/test/java/com/github/tinosteinort/beanrepository/example/_03_cyclicreferenceexample)\n   for a solution\n* no request or session scope\n* no initialisation code allowed in constructor\n    * constructor may be called multiple times while working with the `BeanRepository`\n* a bean can only be accessed by a class\n\n\n## Maven ##\n\nInclude the following artifact to use the `BeanRepository`:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.tinosteinort\u003c/groupId\u003e\n    \u003cartifactId\u003ebeanrepository\u003c/artifactId\u003e\n    \u003cversion\u003e1.7.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Examples\n\nSee [SimpleExampleApp](/src/test/java/com/github/tinosteinort/beanrepository/example/_01_basicexample) for ar very\n basic example.\n\nSee [EventExampleApp](/src/test/java/com/github/tinosteinort/beanrepository/example/_02_eventexample) for an example\n with events and listeners.\n\nSee [CyclicReferenceExampleApp](/src/test/java/com/github/tinosteinort/beanrepository/example/_03_cyclicreferenceexample)\n for an example with cyclic references.\n\n\n\n\n# Version History #\n\n## v1.7.0 ##\nEnhancements:\n* Introduce `BeanRepositoryApplication`\n* Add examples\n\nFixes:\n* [Issue#4](https://github.com/tinosteinort/beanrepository/issues/4):\n  onPostConstruct of singleton beans is executed if the bean is requested, not when the BeanRepository is build\n* [Issue#5](https://github.com/tinosteinort/beanrepository/issues/5):\n  onPostConstruct of a Factory Bean is not triggered\n\n## v1.6.0 ##\nEnhancements:\n* Aliases for beans\n\n## v1.5.1 ##\nFixes:\n* [Issue#3](https://github.com/tinosteinort/beanrepository/issues/3):\n  StackOverflowError when using PostConstructible in Combination with ConstructorInjection\n\n## v1.5.0 ##\nFixes:\n* [Issue#2](https://github.com/tinosteinort/beanrepository/issues/2):\n  getProvidersForSingletons() does not consider Factories\n\nEnhancements:\n* [Issue#1](https://github.com/tinosteinort/beanrepository/issues/1):\n  Method should be private, not for external use\n* Support simple Access to Prototype Beans with Parameter (with and without Dependencies\n  to other Beans)\n\n## v1.4.0 ##\nFixes:\n* Modularisation does not work as expected. Concept refactored.\n\nEnhancements:\n* Constructor Injection\n\n## v1.3.1 ##\nFixes:\n* `Factory.createInstance()` is not called while dryRun. It is executed once for singleton Beans,\n    and every time, when a prototype Bean is requested\n\n## v1.3.0 ##\nEnhancements:\n* A `Factory` can be used to create Beans\n\n## v1.2.0 ##\nEnhancements:\n* Add `Provider` Interface, and Methods to get Providers for registered Beans\n\n## v1.1 ##\nFixes:\n* `onPostConstruct` was called multiple Times on referenced Beans\n\nEnhancements:\n* Add other `getBean(...)` Methods to `BeanAccessor`. This allows to generate `prototype` Beans in\n   a Constructor\n\n## v1.0 ##\nInitial Version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinosteinort%2Fbeanrepository","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinosteinort%2Fbeanrepository","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinosteinort%2Fbeanrepository/lists"}