@Bean(name = "appConfig") public AppConfiguration appConfiguration() throws IOException { AppXMLLoader xmlLoader = new AppXMLLoader(); File appSetup1 = resourceLoader.getResource("WEB-INF/conf/appConfiguration.xml").getFile(); xmlLoader.loadAppProperties(appSetup1); return xmlLoader.getAppConfiguration(); }
public AppConfiguration appSetup(ServletContext servletContext) { com.athena.config.app.xmlParser.AppXMLLoader appXMLLoader = null; try { appXMLLoader = new com.athena.config.app.xmlParser.AppXMLLoader(); appXMLLoader.loadAppProperties( new File(servletContext.getRealPath("/WEB-INF/conf/appConfiguration.xml"))); } catch (Exception e) { e.printStackTrace(); } return appXMLLoader.getAppConfiguration(); }