在web.xml文件中作如下配置:
xml文件中,bean需要用另外一个配置文件中的bean的时候,用ref bean=
用本xml之中的bean时,用ref local=
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
xml文件中,bean需要用另外一个配置文件中的bean的时候,用ref bean=
用本xml之中的bean时,用ref local=