如题所述
第1个回答 推荐于2016-08-30
GamePackService gamePackService;
@Override
public void init() throws ServletException
{
super.init();
WebApplicationContext wac = WebApplicationContextUtils
.getRequiredWebApplicationContext(getServletContext());
gamePackService = (GamePackService) wac.getBean("gamePackService");
}、
在servlet init 方法中加入
,本回答被提问者和网友采纳
@Override
public void init() throws ServletException
{
super.init();
WebApplicationContext wac = WebApplicationContextUtils
.getRequiredWebApplicationContext(getServletContext());
gamePackService = (GamePackService) wac.getBean("gamePackService");
}、
在servlet init 方法中加入
,本回答被提问者和网友采纳