Servlet 獲取 Spring 中的對象
來源:程序員人生 發布時間:2014-12-14 09:01:28 閱讀次數:2717次
ServletContext servletContext = this.getServletContext();
WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext);
managerServ = (IManager) ctx.getBean("IManager");
生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈