mirror of
https://github.com/google/guice.git
synced 2026-10-19 16:16:21 +00:00
Page:
Guice41
Pages
3rdPartyModules
AOP
AppsThatUseGuice
AssistedInject
Avoid Injecting Closable Resources
AvoidCallingProvideMethodsAndInjectConstructors
AvoidConditionalLogicInModules
AvoidStaticState
BeCarefulAboutIoInProviders
BestPractices
BindingAnnotations
BindingResolution
Bindings
Bootstrap
BoundFields
BuiltInBindings
ClassLoading
CustomInjections
CustomScopes
CyclicDependencies
DocumentPublicBindings
DontReuseAnnotations
Errors
ExtendingGuice
ExtensionSPI
ExternalDocumentation
FrequentlyAskedQuestions
GettingStarted
GoogleAppEngine
Grapher
Guice10
Guice20
Guice30
Guice40
Guice41
Guice42
Guice421
Guice422
Guice423
Guice500
Guice501
Guice510
Guice600
Guice700
GuiceDiscussions
GuiceInKotlin
GuicePersist
GuicePersistMultiModules
Home
InjectOnlyDirectDependencies
InjectingProviders
InjectingTheInjector
InjectionPoints
Injections
InspectingModules
InstanceBindings
JPA
JSR330
JustInTimeBindings
KeepConstructorsHidden
LinkedBindings
MentalModel
MinimizeMutability
ModulesShouldBeFastAndSideEffectFree
Motivation
Multibindings
OSGi
OptionalAOP
OrganizeModulesByFeature
PreferAtProvides
ProviderBindings
ProvidesMethods
RestrictedBindingSource
Scopes
ServletExtensionSPI
ServletModule
ServletRegexKeyMapping
Servlets
SpringComparison
Struts2Integration
ThrowingProviders
ToConstructorBindings
Transactions
UntargettedBindings
UseNullable
Clone
8
Guice41
Michael Diamond edited this page 2020-01-17 17:27:27 -08:00
Guice 4.1
Released June 17, 2016
Maven
Guice:
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.1.0</version>
</dependency>
Guice (No AOP):
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.1.0</version>
<classifier>no_aop</classifier>
</dependency>
Extensions:
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-${extension}</artifactId>
<version>4.1.0</version>
</dependency>
Downloads
- Guice: guice-4.1.0.jar
- Guice (No AOP): guice-4.1.0-no_aop.jar
- Guice extensions are all directly downloadable from this search page. Just click on the "jar" link for the appropriate extension.
Docs
Changes since Guice 4.0
Guice Core:
@ProvidedBysupports javax.inject.Provider (issue #808)- Reduced the number of lines in error messages.
- Fix potential rare deadlock when there are multi-threaded cycles in singletons.
- Allow members injection to happen in parallel if it was requested from different threads.
- Make disableCircularProxies more strict.
- Updated the internal cglib to 3.2.0 to allow Guice to be used with signed jars.
- Various performance optimizations.
- TypeListeners no longer get invoked for
Providerinstances that Guice generates for@Providesmethods.
AssistedInject:
- Skip static methods in interfaces (for Java8 compatibility) (issue #937)
Servlet:
- Add Iterable overloads for the varargs methods in ServletModule.
- Add an AutoCloseable-style API for transferring the request scope.
- Normalize the path before applying filters.
Multibindings:
- Add more bound types when using MapBinder. By default,
Set<Map.Entry<K, javax.inject.Provider<V>>will be bound. And additionally ifpermitDuplicates()is called, the following are also bound:Map<K, Set<javax.inject.Provider<V>>>,Map<K, Collection<Provider<V>>>, andMap<K, Collection<javax.inject.Provider<V>>>.
Testing Libraries:
- Fix
@Bindto support javax.inject.Provider. - Allow
@Bindto bind to null if annotated with@Nullable. - Allow
@Bind(lazy=true)with Providers.
Dagger Adapter:
- Support the new multibinding declaration style (
@IntoSet, etc..)
Migrating from Guice 4.0
See the JDiff change report for complete details.
-
User's Guide
-
Integration
-
Extensions
-
Internals
-
Releases
-
Community