Relative References in Expressions in XML bean definitions in Spring 3.0


Relative References in Expressions in XML bean definitions in Spring 3.0



This is the example from the spring 3.0 reference:

<bean id="numberGuess" class="org.spring.samples.NumberGuess">     <property name="randomNumber" value="#{ T(java.lang.Math).random() * 100.0 }"/> </bean>  <bean id="shapeGuess" class="org.spring.samples.ShapeGuess">     <property name="initialShapeSeed" value="#{ numberGuess.randomNumber }"/> </bean> 

But what I intend to do is something like this:

<bean id="foo" class="com.example.Foo">     <property name="name" value="myName"/>     <property name="prop">         <bean class="com.example.Bar">             <property name="#{ parent.name }" />         </bean>     </property> </bean> 

So the property name of the inner bean is populated with the name of the outer bean. Is this possible with the spring expression language at all? What would be the expression for something like this (parent clearly doesn't work ^^)?




What should I learn first, Spring or Hibernate? [closed]

1:



What is best way to learn Spring AOP or AOP in general?
I don't think that's possible in the given milestone build.


What are all the portlet classes in Spring mvc?
They're still taking feature requests for RC1, though, so I suggest filing one..
portlet 2.0 (jsr286) development with spring


Corrupted HTTP headers on Apache/Weblogic 9.2


94 out of 100 based on 54 user ratings 754 reviews