当前位置: 代码迷 >> J2EE >> 关于struts2 与 Spring 的有关问题
  详细解决方案

关于struts2 与 Spring 的有关问题

热度:133   发布时间:2016-04-22 03:09:47.0
关于struts2 与 Spring 的问题
我现在想再 struts2 拦截器中 怎样获得spring中的bean的 实例

------解决方案--------------------

ApplicationContext ac=WebApplicationContextUtils.getWebApplicationContext(servletContext);
Object bean=ac.getBean(name);
  相关解决方案