Servlet 獲取 Spring 中的對(duì)象
來源:程序員人生 發(fā)布時(shí)間:2014-12-14 09:01:28 閱讀次數(shù):2722次
ServletContext servletContext = this.getServletContext();
WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext);
managerServ = (IManager) ctx.getBean("IManager");
生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對(duì)您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈(zèng)