does guice support property injection or only constructor?

36 views
Skip to first unread message

gitted

unread,
Dec 1, 2012, 11:19:13 AM12/1/12
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 PM12/1/12
to google...@googlegroups.com
Mark any non-final field with @Inject and have fun.

Noctarius

unread,
Dec 1, 2012, 12:42:19 PM12/1/12
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