Hello,
Is it possible that we can put tokens in an xml file and replace those tokens with the import tag in Spring?
e.g.
1. In commonBeans.xml
<bean id="handlerMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
<property name="interceptors">
<list>
<ref bean="myInterceptor"/>
</list>
<property name="mappings">
<value>
@mapping.token@=@controller.token@
</value>
</property>
</bean>
<bean id="myInterceptor" class="com.MyInterceptor"/>
2. In servlet context xml
<import resource="commonBeans.xml">
<replace name="@mapping.token@" value="/myMapping*"/>
<replace name="@controller.token@" value="/myController*"/>
</import>
thanks a lot


Reply With Quote