Spring使用非applicationContext.xm 默认名的配置文件的配置
2015-11-06 09:42
555 查看
Spring默认的配置文件是applicationContext.xml,但是有些时候,希望拆分Spring的配置文件,让其单一化,每一个都只进行自己的配置,如图所示
那么就需要在web.xml中配置自定义的spring配置文件名称了
这样就指定了自定义的配置文件名称。
同时不要忘记设置spring容器的监听器哦~
那么就需要在web.xml中配置自定义的spring配置文件名称了
<context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring/spring-all.xml</param-value> </context-param>
这样就指定了自定义的配置文件名称。
同时不要忘记设置spring容器的监听器哦~
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
相关文章推荐
- android studio 安装
- cocos2d-x Programmers Guide v3.3 译本和阅读笔记(第3章:精灵)
- 关于 android receiver
- Cocos2dx3.0过渡篇 各种遍历与范围for语句的使用【转】
- Android 请求码与结果码
- Apple Watch通过WiFi连接iPhone的方法
- Android牟利之道(一)--界面嵌入有米广告
- EntboostChat 1.3发布,iOS开源手机IM,恩布IM
- 将指定路径的图片,显示在android系统相册中
- iOS字体设置
- Android接入融云sdk流程(思路)
- Android开发之自定义控件(一)---onMeasure详解
- iOS开发:icon和启动图尺寸
- Android完美解析setContentView 你真的理解setContentView吗?
- android 怎么不让editview获取到焦点
- iOS 代码规范(Code Style)
- cocos2dx中retain和release
- Android Manifest <meta-data>
- 【Android】文件操作工具类(FileUtil.java)
- Android系列教程之EditText使用详解-包含很多教程上看不到的功能演示