Resource resource = new ClassPathResource("../applicationContext.xml");
BeanFactory factory = new XmlBeanFactory(resource);
interceptionNeedInfo = (IInterceptionNeedInfo)factory.getBean("interceptionNeedInfo");
ICodetypeAction codetype = (ICodetypeAction)factory.getBean("codetypeAction");
List<Map<String, String>> codeTypeList = codetype.getCodeType();
return codeTypeList;
main获得Spring配置文件中的bean
最新推荐文章于 2023-04-16 13:52:25 发布