+ -
当前位置:首页 → 问答吧 → 多个spring,applicationContext文件,在一个文件中,怎么引用其他文件中的bean

多个spring,applicationContext文件,在一个文件中,怎么引用其他文件中的bean

时间:2011-09-07

来源:互联网

比如一个主的applicationContext.xml文件,一个子的applicationContext-cxf.xml文件,现在子文件中要调用主文件中的
<bean id="sqlmapclient"></bean>这个bean,应该怎么处理?

spring的多文件已经在wen.xml中进行配置了,如下
<param-value>
classpath*:applicationContext*.xml,
classpath*:com/**/applicationContext*.xml,
</param-value>

作者: wjzlhm0214   发布时间: 2011-09-07

<bean class=xxx>
<property name=xx ref=sqlmapclient/>

作者: Fly_m   发布时间: 2011-09-07