首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

spring配置文件获取形式

2012-11-04 
spring配置文件获取方式1、在src下(class):??ApplicationContext ctx new ClassPathXmlApplicationContex

spring配置文件获取方式

1、在src下(class):??

ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");//spring 上下文

?2、在/WebRoot/WEB-INF/下(带路径的)

ApplicationContext ctx = new FileSystemXmlApplicationContext("/WebRoot/WEB-INF/applicationContext.xml");//spring 上下文

?

热点排行