-
Oct 7th, 2009, 03:15 AM
#1
how to replace a bean defined in XML ApplicationContext
Hi,
I have a "ServiceClient.spring.xml" configuration file, defining some Beans like this:
...
<bean id="com.gide.gdcams.service.ui.LoginService" class="org.springframework.remoting.httpinvoker.Ht tpInvokerProxyFactoryBean" >
<property name="serviceUrl" value="http://${servername}/${contextPath}/LoginService"/>
<property name="serviceInterface" value="com.gide.gdcams.service.ui.LoginService"/>
<property name="httpInvokerRequestExecutor" ref="SecurityContextRequestExecutor"/>
</bean>
...
this beans are configured actually via a PropertyPlaceHolderConfigurer:
<!-- Property Placeholder -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
<property name="location" value="file:${gdcams.ui.rootdir}/config/service.properties"/>
</bean>
=> the problem is, i dont have a "service.properties" file in my filesystem, and i dont want to create one and set the system.property "gdcams.ui.rootdir"
How can I instead replace the "propertyConfigurer" Bean with another configuration, when loading this file with a ClasspathXmlApplicationContext?
I couldnt change the "ServiceClient.spring.xml" file, itīs part of a jar in my classpath - I can only handle the way the file is loaded.....
Thanx, Torsten
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