/** Imports data into database by executing the sql datadump script */ private void importData() { context = new AnnotationConfigApplicationContext(SpringConf.class); CustomResourceLoader customResourceLoader = (CustomResourceLoader) context.getBean("customResourceLoader"); try { Resource query = customResourceLoader.getDataDumpResource(configFile.getDatadumpPath()); ScriptUtils.executeSqlScript(dataSource.getConnection(), query); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ScriptException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } }