首页 > 代码库 > spring 获取 bean

spring 获取 bean

ApplicationContext ac1 = WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext());
TopicAction result = (TopicAction)ac1.getBean("TopicAction");