in Google guice 2.0 I used to get my classes injected via annotation Inject 
and trait Injection, which provide injector. 
But now. in verdion 3.0 I don't understand how can I do injection, cause I 
cant find Injection trait in library. 

trait MyService extends HttpService r{
>   @Inject
>   var userService:UserSvc = _
>   def someMethod = userService.someApiMethod()   // userService is null 
> here
> }


I think I have configured my modules in proper way..

>
>  object Boot{

 

val injector = new ScalaInjector(Guice.createInjector(new MyModule()))
>  }

 


> class MyModule extends AbstractModule with ScalaModule {
>   def configure {
>     bind[UserSvc].to[UserSvcImpl]
>   }
> }


 What is wrong? Thanks in advance!

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/0I3O6vj4yqUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to