首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

servlet中施用spring

2012-11-06 
servlet中使用springServletContext applicationWebApplicationContext wacapplication getServletCon

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();
?

热点排行