2014年1月7日

获取 web容器中的bean

摘要: public class WebContextBeanFinder { public static Object getBean(String beanId) { ServletContext servletContext = ServletActionContext.getServletContext(); WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext); return context.getBean(beanId); }} 阅读全文

posted @ 2014-01-07 17:14 a_badegg 阅读(150) 评论(0) 推荐(0) 编辑

导航