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

	}
}

servlert中处理spring Bean,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!