The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
Guice Alternatives
Similar projects and alternatives to Guice
-
aws-lambda-java-libs
Official mirror for interface definitions and helper classes for Java code running on the AWS Lambda platform.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
carbon-lang
Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
picocli
Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
-
Weld
Weld, including integrations for Servlet containers and Java SE, examples and documentation (by weld)
-
Simple Injector
An easy, flexible, and fast Dependency Injection library that promotes best practice to steer developers towards the pit of success.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Guice reviews and mentions
-
Hexagonal Architecture/Ports And Adapters: Clarifying Key Concepts Using Go
Historically, Ports and Adapters was born in the context where Dependency Inversion Principle (DIP) was getting hot, back in the beginning of the 2000’s. DIP was getting more present on development day to day, and an example of a framework that was a pioneer in such topic is Google Guice.
-
Inversion of Control Containers and the Dependency Injection Pattern (2004)
“There are many advantages to using dependency injection, but doing so manually often leads to a large amount of boilerplate code to be written. Guice is a framework that makes it possible to write code that uses dependency injection without the hassle of writing much of that boilerplate code”
This is a common misconception. Guice’s docs delineate between dependency injection as a pattern and Guice as a framework that supports that pattern.
https://github.com/google/guice/wiki
- How to dependency injection
-
Why dependency injection?
You can (and it's very normal to) use that with new. Dependency injection frameworks (like guice) let you skip passing long parameter lists to constructor arguments like you mention. But you don't really NEED that. They also will solve circular dependency issues and some other things, although a strong argument could be made that you should simply restructure your code so that those issues don't exist.
-
Bob Lee, Former CTO Square, Creator of CashApp, Stabbed to Death in SF
Bob was a nice guy. We had an overlapping tenure at Google in the 2000s. He was one of the original authors of the Guice dependency injection framework: https://github.com/google/guice. When I was earning Java readability at Google, I was fortunate to have had him assigned as a reviewer. Huge loss; he left a very positive impression on me.
-
Bob Lee Was Killed
He was fairly well known figure in the Java world. RIP.
[1] https://github.com/google/guice
-
Handling two contexts
Usually each context has a different scope and lifetime associated with it. Here, it sounds like there are two distinct scopes: server and request (cf. how Guice models scopes: https://github.com/google/guice/wiki/Scopes). It is rarely sensible to merge the scopes or contexts together. If we think about a context, it contains several things:
-
Anyone succeed in running GL5 + Opensearch on FreeBSD?
Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors: 1) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? MoreSearchAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:57) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : MoreSearchAdapterProvider.(MoreSearchAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:57) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 2) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? V20200730000000_AddGl2MessageIdFieldAliasForEvents$ElasticsearchAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:65) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : V20200730000000_AddGl2MessageIdFieldAliasForEventsElasticsearchAdapterProvider.(V20200730000000_AddGl2MessageIdFieldAliasForEventsElasticsearchAdapterProvider.java:34) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:65) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 3) [Guice/MissingImplementation]: No implementation for Map>> was bound. Did you mean? QueryBackend bound at VersionAwareStorageModule.bindQueryBackend(VersionAwareStorageModule.java:72) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : ElasticsearchBackendProvider.(ElasticsearchBackendProvider.java:33) \_ for 2nd parameter at VersionAwareStorageModule.bindQueryBackend(VersionAwareStorageModule.java:72) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 4) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) QuerySuggestionsService bound at ViewsBindings.configure(ViewsBindings.java:245) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : QuerySuggestionsProvider.(QuerySuggestionsProvider.java:31) \_ for 2nd parameter at ViewsBindings.configure(ViewsBindings.java:245) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 5) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) ExportBackend bound at ViewsBindings.registerExportBackendProvider(ViewsBindings.java:255) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : ExportBackendProvider.(ExportBackendProvider.java:31) \_ for 2nd parameter at ViewsBindings.registerExportBackendProvider(ViewsBindings.java:255) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 6) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? IndexToolsAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:62) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : IndexToolsAdapterProvider.(IndexToolsAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:62) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 7) [Guice/MissingImplementation]: No implementation for Map> was bound. Requested by: 1 : ClusterAdapterProvider.(ClusterAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:59) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 8) [Guice/MissingImplementation]: No implementation for Map> was bound. Requested by: 1 : NodeAdapterProvider.(NodeAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:60) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 9) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? CountsAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:54) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : CountsAdapterProvider.(CountsAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:54) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 10) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? IndexFieldTypePollerAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:61) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : IndexFieldTypePollerAdapterProvider.(IndexFieldTypePollerAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:61) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 11) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? StreamsForFieldRetriever bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:53) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : StreamsForFieldRetrieverProvider.(StreamsForFieldRetrieverProvider.java:33) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:53) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 12) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? IndicesAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:55) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : IndicesAdapterProvider.(IndicesAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:55) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 13) [Guice/MissingImplementation]: No implementation for Map> was bound. Requested by: 1 : MessagesAdapterProvider.(MessagesAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:58) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 14) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? SearchesAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:56) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : SearchesAdapterProvider.(SearchesAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:56) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 15) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? V20170607164210_MigrateReopenedIndicesToAliases$ClusterState bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:63) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : V20170607164210_MigrateReopenedIndicesToAliasesClusterStateAdapterProvider.(V20170607164210_MigrateReopenedIndicesToAliasesClusterStateAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:63) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 15 errors ====================== Full classname legend: ====================== ClusterAdapter: "org.graylog2.indexer.cluster.ClusterAdapter" ClusterAdapterProvider: "org.graylog2.storage.providers.ClusterAdapterProvider" CountsAdapter: "org.graylog2.indexer.counts.CountsAdapter" CountsAdapterProvider: "org.graylog2.storage.providers.CountsAdapterProvider" DetectedSearchVersion: "org.graylog2.storage.DetectedSearchVersion" ElasticsearchBackendProvider: "org.graylog2.storage.providers.ElasticsearchBackendProvider" ElasticsearchModule: "org.graylog2.bindings.ElasticsearchModule" ExportBackend: "org.graylog.plugins.views.search.export.ExportBackend" ExportBackendProvider: "org.graylog.plugins.views.providers.ExportBackendProvider" GeneratedQueryContext: "org.graylog.plugins.views.search.engine.GeneratedQueryContext" IndexFieldTypePollerAdapter: "org.graylog2.indexer.fieldtypes.IndexFieldTypePollerAdapter" IndexFieldTypePollerAdapterProvider: "org.graylog2.storage.providers.IndexFieldTypePollerAdapterProvider" IndexToolsAdapter: "org.graylog2.indexer.IndexToolsAdapter" IndexToolsAdapterProvider: "org.graylog2.storage.providers.IndexToolsAdapterProvider" IndicesAdapter: "org.graylog2.indexer.indices.IndicesAdapter" IndicesAdapterProvider: "org.graylog2.storage.providers.IndicesAdapterProvider" MessagesAdapter: "org.graylog2.indexer.messages.MessagesAdapter" MessagesAdapterProvider: "org.graylog2.storage.providers.MessagesAdapterProvider" MoreSearchAdapter: "org.graylog.events.search.MoreSearchAdapter" MoreSearchAdapterProvider: "org.graylog2.storage.providers.MoreSearchAdapterProvider" Named: "com.google.inject.name.Named" NamedConfigParametersModule: "com.github.joschi.jadconfig.guice.NamedConfigParametersModule" NodeAdapter: "org.graylog2.indexer.cluster.NodeAdapter" NodeAdapterProvider: "org.graylog2.storage.providers.NodeAdapterProvider" Provider: "javax.inject.Provider" QueryBackend: "org.graylog.plugins.views.search.engine.QueryBackend" QuerySuggestionsProvider: "org.graylog.plugins.views.providers.QuerySuggestionsProvider" QuerySuggestionsService: "org.graylog.plugins.views.search.engine.QuerySuggestionsService" SearchVersion: "org.graylog2.storage.SearchVersion" SearchesAdapter: "org.graylog2.indexer.searches.SearchesAdapter" SearchesAdapterProvider: "org.graylog2.storage.providers.SearchesAdapterProvider" StreamsForFieldRetriever: "org.graylog2.indexer.fieldtypes.streamfiltered.esadapters.StreamsForFieldRetriever" StreamsForFieldRetrieverProvider: "org.graylog2.storage.providers.StreamsForFieldRetrieverProvider" V20170607164210_MigrateReopenedIndicesToAliases$ClusterState: "org.graylog2.migrations.V20170607164210_MigrateReopenedIndicesToAliases$ClusterState" V20170607164210_MigrateReopenedIndicesToAliasesClusterStateAdapterProvider: "org.graylog2.storage.providers.V20170607164210_MigrateReopenedIndicesToAliasesClusterStateAdapterProvider" V20200730000000_AddGl2MessageIdFieldAliasForEvents$ElasticsearchAdapter: "org.graylog.plugins.views.migrations.V20200730000000_AddGl2MessageIdFieldAliasForEvents$ElasticsearchAdapter" V20200730000000_AddGl2MessageIdFieldAliasForEventsElasticsearchAdapterProvider: "org.graylog2.storage.providers.V20200730000000_AddGl2MessageIdFieldAliasForEventsElasticsearchAdapterProvider" VersionAwareStorageModule: "org.graylog2.storage.VersionAwareStorageModule" ViewsBindings: "org.graylog.plugins.views.ViewsBindings" ======================== End of classname legend: ======================== at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:568) at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:163) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110) at com.google.inject.Guice.createInjector(Guice.java:87) at org.graylog2.shared.bindings.GuiceInjectorHolder.createInjector(GuiceInjectorHolder.java:34) at org.graylog2.bootstrap.CmdLineTool.setupInjector(CmdLineTool.java:502) at org.graylog2.bootstrap.CmdLineTool.doRun(CmdLineTool.java:306) at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:260) at org.graylog2.bootstrap.Main.main(Main.java:45)
-
Dependency Injection in Scala - cake pattern
using libraries from java world, such as Guice;
-
Dependency injection with AWS Lambdas in java
As said in the title, we will focus on the dependency inversion principle and one of its application : dependency injection. For production-ready applications, it would be better to rely on a framework and not implement its own container. For it, the java ecosystem have 3 frameworks available : Spring, Guice and Dagger.
-
A note from our sponsor - WorkOS
workos.com | 25 Apr 2024
Stats
google/guice is an open source project licensed under Apache License 2.0 which is an OSI approved license.
The primary programming language of Guice is Java.
Sponsored