关于struts2 与 Spring 的问题
我现在想再 struts2 拦截器中 怎样获得spring中的bean的 实例
[解决办法]
ApplicationContext ac=WebApplicationContextUtils.getWebApplicationContext(servletContext);
Object bean=ac.getBean(name);
发布时间: 2011-12-24 23:03:24 作者: rapoo
关于struts2 与 Spring 的问题
我现在想再 struts2 拦截器中 怎样获得spring中的bean的 实例
[解决办法]
ApplicationContext ac=WebApplicationContextUtils.getWebApplicationContext(servletContext);
Object bean=ac.getBean(name);