第1个回答 推荐于2016-02-15
Resource resource = new ClassPathResource("../applicationContext.xml");
BeanFactory factory = new XmlBeanFactory(resource);
interceptionNeedInfo = (IInterceptionNeedInfo)factory.getBean("interceptionNeedInfo");
ICodetypeAction codetype = (ICodetypeAction)factory.getBean("codetypeAction");
参照这个。
applicationContext.xml 位置在WEB-INF中本回答被提问者采纳