2013年10月5日

Spring容器的初始化4种方式

摘要: 1.从classpath路径中加载applicationContext.xml文件。Resource resourc=new ClassPathResource("applicationContext.xml"); XmlBeanFactory bean=new XmlBeanFactory(); BeanA a=(BeanA)bean.getBean("beanid");2.从文件系统中加载。Resource resourc=new FileSystemResource("src:/applicationContext.xml"); 阅读全文

posted @ 2013-10-05 21:05 玲珑go 阅读(766) 评论(0) 推荐(0) 编辑

导航