Groups
Groups
Sign in
Groups
Groups
google-guice
Conversations
About
Send feedback
Help
does guice support property injection or only constructor?
36 views
Skip to first unread message
gitted
unread,
Dec 1, 2012, 11:19:13 AM
12/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-guice
In spring I can do:
@Autowired
private SomeService someService;
And it will get autowired, does guice have something similiar, I have
only seen examples of constructor injection.
Aekold
unread,
Dec 1, 2012, 12:44:13 PM
12/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google...@googlegroups.com
Mark any non-final field with @Inject and have fun.
Noctarius
unread,
Dec 1, 2012, 12:42:19 PM
12/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google...@googlegroups.com
https://code.google.com/p/google-guice/wiki/Injections
Third chapter - Field Injection
Reply all
Reply to author
Forward
0 new messages