首页 > 代码库 > servlert中处理spring Bean

servlert中处理spring Bean

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");

	}
}