-
Oct 26th, 2005, 12:37 PM
#1
using static instance variables in spring configuration
Hi,
Is there a way to access static instance variables in a Spring configuration? I'd like to do something like:
<bean id="writer" class="java.io.OutputStreamWriter">
<constructor-arg>
<bean instance="java.lang.System.out" />
</constructor-arg>
</bean>
There is no such bean 'instance' attribute, and I haven't found a way to do this otherwise... Any help is appreciated.
Thanks,
Edwin
-
Oct 26th, 2005, 03:45 PM
#2
Have a look at the JavaDocs for org.springframework.beans.factory.config.FieldRetr ievingFactoryBean. This does exactly what you are asking.
rgds,
Alef
-
Oct 26th, 2005, 05:21 PM
#3
thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules