akfoote
Jul 3rd, 2012, 02:08 PM
Hi all - new to spring and the way spring handles the underlying data (that I need to get to :)
I've got a project where I'm instantiating beans to handle incoming request header values. The filter bean that is defined is correctly picking these up and creating its internal map structure.
Now I need to get this map into another bean ..
What I have so far has not worked....
In a nutshell, I'm trying to set the Map of my second bean by accessing a getHeaderMap of the first filter bean.
<bean id="requestHeaderFilter" class="my.web.RequestHeaderFilter">
<property name="headerMapping">
<map>
<entry key="eid" value="eid" />
<entry key="displayName" value="displayName" />
</map>
</property>
</bean>
<bean id="headerRepo"
class="my.web.HeaderCollection">
<property name="backingMap" ref="requestHeaderFilter.getHeaderMapping()" />
</bean>
Any bean guidance would be helpful.. I'm currently also reading 'springbyexample' but just started...
Thanks.
I've got a project where I'm instantiating beans to handle incoming request header values. The filter bean that is defined is correctly picking these up and creating its internal map structure.
Now I need to get this map into another bean ..
What I have so far has not worked....
In a nutshell, I'm trying to set the Map of my second bean by accessing a getHeaderMap of the first filter bean.
<bean id="requestHeaderFilter" class="my.web.RequestHeaderFilter">
<property name="headerMapping">
<map>
<entry key="eid" value="eid" />
<entry key="displayName" value="displayName" />
</map>
</property>
</bean>
<bean id="headerRepo"
class="my.web.HeaderCollection">
<property name="backingMap" ref="requestHeaderFilter.getHeaderMapping()" />
</bean>
Any bean guidance would be helpful.. I'm currently also reading 'springbyexample' but just started...
Thanks.