Struts2拦截器如何使用Spring注入

ActionContext actionContext = intercation.getInvocationContext(); ServletContext context = (ServletContext) actionContext.get(StrutsStatics.SERVLET_CONTEXT); ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context); ResultRoleRiskDao resultRoleRiskDao =(ResultRoleRiskDao)ctx.getBean("resultRoleRiskDao");

你可能感兴趣的:(struts2拦截器)