WebApplicationContext wc = WebApplicationContextUtils
.getWebApplicationContext(request.getSession()
.getServletContext());
ICommonService cs = (ICommonService) wc.getBean("commonService");
.getWebApplicationContext(request.getSession()
.getServletContext());
ICommonService cs = (ICommonService) wc.getBean("commonService");
本文介绍了一种从ServletContext中获取WebApplicationContext的方法,并展示了如何通过此上下文获取名为'commonService'的bean实例。
1万+

被折叠的 条评论
为什么被折叠?



