public class WebContextBeanFinder {

public static Object getBean(String beanId) {
ServletContext servletContext = ServletActionContext.getServletContext();
WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
return context.getBean(beanId);
}
}

04-16 00:31