Top "Guice" questions

Guice is a lightweight dependency injection framework for Java.

Is an unbound SecurityManager really an invalid application configuration in Shiro?

I'm adding Apache Shiro to my application and I'm wondering if the following error message is truly accurate: org.apache.…

guice thrift shiro
Guice: Difference between Binder#bindConstant() and Binder#bind() ... toInstance

I would like to ask what's the difference between bindConstant().annotatedWith(Names.named("keepAliveInterval")).to(60); and bind(Integer.TYPE).annotatedWith(…

java constants config guice
Should Guice Providers with expensive member instances as be annotated with @Singleton?

Should Guice Providers be annotated with @Singleton? My justification: if the Provider is providing an object to other Singleton classes …

java dependency-injection singleton guice
How to exclude/redirect certain url pattern in web.xml or Guice servlet module?

I need to serve my main application with the url pattern "/*" so this pattern is matched to a Servlet. The …

java regex guice deployment-descriptor
Mock a superclass constructor

I would like to know if I can mock a super class constructors call and its super() calls. For example, …

java junit guice mockito jmock
Java Dependency injection: XML or annotations

Annotations becoming popular. Spring-3 supports them. CDI depends on them heavily (I can not use CDI with out of annotations, …

java spring dependency-injection guice cdi
Guice Inject Field in class not created by Guice

I have a class like so, that I create myself somewhere in my code: class StarryEyes { @Inject MyValidator validator; public …

java null guice code-injection
Guice + Tomcat potential memory leak

I have just started using Google Guice with my Tomcat webapp, and have noticed the following in the catalina.out …

java tomcat guice guice-servlet
How to test implementations of Guice AbstractModule?

How to test implementations of Guice AbstractModule in a big project without creating fake implementations? Is it possible to test …

unit-testing configuration bind guice inject
Guice assistedinject already configured

I have an issue with the AssistedInject. I followed the instructions on this link https://github.com/google/guice/wiki/…

java dependency-injection guice assisted-inject