ServletContext application;
WebApplicationContext wac;
application = getServletContext();
wac = WebApplicationContextUtils.getWebApplicationContext(application);// 获取spring的context
BaseDaoImpl 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();
servlet中使用spring
最新推荐文章于 2024-05-28 16:15:39 发布