WebApplicationContext wac = (WebApplicationContext)config.getServletContext().getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
StationService stationService = (StationService)wac.getBean("stationService");
LinkService linkService = (LinkService)wac.getBean("linkService");