读书人

servlet中施用spring

发布时间: 2012-11-06 14:07:00 作者: rapoo

servlet中使用spring

ServletContext application;WebApplicationContext wac;application = getServletContext();wac = WebApplicationContextUtils.getWebApplicationContext(application);// 获取spring的contextBaseDaoImpl user = (BaseDaoImpl) wac.getBean("baseDaoImpl");byte[] b = user.getBlob("{2d712e35-2be6-46cf-b702-1f47468d6042}", 5,133, 28);PrintWriter out = response.getWriter();out.print(b);out.flush();
?

读书人网 >编程

热点推荐