public class InitServlet extends HttpServlet { private static final long serialVersionUID = - 5826096764263027718L; public void destroy() { super.destroy(); } public void init() throws ServletException { super.init(); // SpringBeanAutowiringSupport.processInjectionBasedOnServletCo ntext(this, // getServletContext()); // List<TProductIssue> list = proService.getCTRIPTProductIssue(); // System.out.println(list.size()); // WebApplicationContext ctx =WebApplicationContextUtils.getWebApplicationContext (getServletContext()); // Sender sender = (Sender) ctx.getBean ("sender"); // sender.sendInfo("testkey", "testvalue"); } }
servlert中处理spring Bean,布布扣,bubuko.com
原文:http://blog.csdn.net/lzl102801/article/details/25375337