实例化Spring容器
实例化Spring容易的两种方法
在类路径下寻找配置文件
ApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{"beans.xml"})
在文件系统路径下寻找配置文件
ApplicationContext ctx = new fileSystemXmlApplicationContext(new String[]{"d:\\beans.xml"})
实例化Spring容易的两种方法
在类路径下寻找配置文件
ApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{"beans.xml"})
在文件系统路径下寻找配置文件
ApplicationContext ctx = new fileSystemXmlApplicationContext(new String[]{"d:\\beans.xml"})
暂无评论。
评论功能维护中,当前仅展示历史评论。