public static RequestMapper readSpringConfig ( String configPath , ServletContext servletContext ) { LOGGER . info ( "Loading from config file " + configPath ) ; currentContext = new FileSystemXmlApplicationContext ( "file:" + configPath ) ; Map < String , RequestHandler > beans = currentContext . getBeansOfType ( RequestHandler . class , false , false ) ; return new RequestMapper ( beans . values ( ) , servletContext ) ; }
Read the single Spring XML configuration file located at the specified path performing PropertyPlaceHolder interpolation extracting all beans which implement the RequestHandler interface and construct a RequestMapper for those RequestHandlers on the specified ServletContext .