servlert中处理spring Bean
时间:2014-05-09 14:45:06
收藏:0
阅读:324
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"); } }
评论(0)