struts2 Action得到spirng ApplicationContext
ApplicationContext ac = WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext()); DataSource ds = (DataSource) ac.getBean("dataSource");