applicationcontext.xml里面导入别的xml的方法<import resource="/bean.xml"/>(一)
2013-10-24 11:46
357 查看
只需加入
<import resource="/bean.xml"/>
或者
<import resource="bean.xml"/>即可
具体情况是
api说三种都可以,这三个都是相对路径
下面两个是下一层的才可以
<beans>
<import resource="services.xml"/>
<import resource="resources/messageSource.xml"/>
<import resource="/resources/themeSource.xml"/>
<bean id="bean1" class="..."/>
<bean id="bean2" class="..."/>
</beans>
相关文章推荐
- CXF之<import resource="classpath:META-INF/cxf/cxf.xml" />找不到文件的问题
- applicationContext.xml文件中<bean>标签中property属性用法说明
- Spring的配置文件applicationContext.xml中的 <context:component-scan base-package="com.orm" />
- applicationContext.xml中<context:annotation-config> 和 <context:component-scan>的区别
- Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml
- 【编程技巧】applicationContext.xml 里面可配置bean和数据库地址
- Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:28:5
- web.xml里面添加注释的方法<!-- -->
- Spring配置文件元素<context:property-placeholder location="classpath:application.properties" />
- 为什么applicationContext.xml和spring-servlet.xml中都有注解过滤<context:component-scan base-package="myprojec...
- Tomcat配置文件context.xml中<Loader delegate="true" />作用
- Spring InitializingBean和ApplicationListener<ContextRefreshedEvent>
- Error creating bean with name 'bookBizImpl' defined in class path resource [applicationContext.xml]
- Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- TTPRequest 提示#import <libxml/HTMLparser.h>找不到 的解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- spring:<context:property-placeholder location="classpath:application.properties" />
- Bean都初始化完成后,实现ApplicationListener<ContextRefreshedEvent>接口