I would load it, parse the property and bind it in a separate module.
As long as the value is bound (ideally with a qualifier/binding
annotation) then other things (including your constructors) can depend
on it properly. Trying to manually inject it into these other classes
is more work than you need to do.
Are you trying to convert all properties from spring, or specific
properties? Because you can make a special module that parses spring
configurations and binds the properties, but that's more work than maybe
you need, if you're just grabbing a few specific properties.
Also, do these need to live in spring configuration xml files?
Christian.
On 6 Apr 2014, at 10:40, Jochen Wiedmann wrote:
All I am trying is to convert
<property name="foo" value="10"/>
from Springs XML configuration. If you have a better idea, I'll be
glad.
Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency
Injection
email: [email protected] :::: mobile: +1 (646) 807-9839
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/d/optout.