Google Guice
Stable release
5.1.0 / January 24, 2022; 12 months ago (2022-01-24)[1]
Written inJava
TypeDependency injection framework
LicenseApache License 2.0 Edit this on Wikidata

Google Guice (pronounced like "juice")[2] is an open-source software framework for the Java platform released by Google under the Apache License. It provides support for dependency injection using annotations to configure Java objects.[3] Dependency injection is a design pattern whose core principle is to separate behavior from dependency resolution.

Guice allows implementation classes to be bound programmatically to an interface, then injected into constructors, methods or fields using an @Inject annotation. When more than one implementation of the same interface is needed, the user can create custom annotations that identify an implementation, then use that annotation when injecting it.

Being the first generic framework for dependency injection using Java annotations in 2008, Guice won the 18th Jolt Award for best Library, Framework, or Component.[3][4]

See also


  1. ^ "Guice510 · google/guice Wiki". Retrieved 2022-05-12.
  2. ^ "google-guice - Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 5 and above, brought to you by Google". Google Project Hosting. 2007-03-23. Retrieved 2013-11-24.
  3. ^ a b Yuan, Michael. "Guice (Google)". Retrieved 2010-04-09.
  4. ^ "18th Annual Jolt Award winners".

Further reading