Skip to content
Advertisement

Tag: guice

Expose Map from guice private Module

I am trying to expose a map from private module similar to Expose Map in private guice module but getting an error Could not expose() java.util.Map annotated with @com.google.inject.name.Named(value=myMap), it must be explicitly bound. I have written this code: Also in another class where I am injecting it, it gives: No implementation for java.util.Map<java.lang.String, java.lang.String> was bound. Please check. thanks

Bootstrapping Guice injector

I have a scenario where I will need some objects injecting at the start like logging, but then other objects injected on demand. What I don’t know is if in my console application, do I just call: in my Main function and then when I need another object, the type that I need on demand, do I use a Provider

Guice injector in JUnit tests [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago. Improve this question Using Guice, is it a good practice to get a new injector in each JUnit test class, as each test class

Advertisement