File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Frameworks
»
Spring
Author
using spring expressions
sam bartl
Ranch Hand
Joined: Oct 29, 2010
Posts: 43
posted
Nov 22, 2010 09:55:51
0
I have this traditional bean using methodInvokingfactoryBean
<bean id="findUrl" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetObject" ref="systemProperties" /> <property name="targetMethod"><value>getPropertyValue</value></property> <property name="arguments"> <list> <value>find_service_url</value> </list> </property> </bean>
please tell me how to write the same using expressions ?
Mark Spritzler
ranger
Sheriff
Joined: Feb 05, 2001
Posts: 17225
1
I like...
posted
Nov 22, 2010 16:59:05
0
basically use
#{systemProperties.find_service_url}
Where find_service_url is the property name in System.
That is using Spring's SpEL.
So if I want to set a property in my MarkService with that value
<bean id="markService" class="com.mark.MarkServiceImpl"> <property name="myProp" value="#{systemProperties.find_service_url}"/> </bean
Mark>
Perfect World Programming, LLC
-
Two Laptop Bag
-
Tube Organizer
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
http://aspose.com/file-tools
subject: using spring expressions
Similar Threads
Spring: Not able to redirect to a bean
Spring Transaction using Spring AOP
start up jobs on production environment
How to Pass arguements in errors.rejectValue()
how do i solve this error caused due to problem in spring initiation on tomcat
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter