diff --git a/oxo-indexer/src/main/java/uk/ac/ebi/spot/indexer/SolrIndexer.java b/oxo-indexer/src/main/java/uk/ac/ebi/spot/indexer/SolrIndexer.java index eb16565..8f6ac8b 100644 --- a/oxo-indexer/src/main/java/uk/ac/ebi/spot/indexer/SolrIndexer.java +++ b/oxo-indexer/src/main/java/uk/ac/ebi/spot/indexer/SolrIndexer.java @@ -41,17 +41,18 @@ public class SolrIndexer implements CommandLineRunner { SolrClient solrClient() { return new HttpSolrClient(environment.getProperty("spring.data.solr.host")); } + @Bean public SolrTemplate solrTemplate() { return new SolrTemplate(solrClient(), "mapping"); } - + @Override public void run(String... strings) throws Exception { termService.rebuildIndexes(); } public static void main(String[] args) throws Exception { - SpringApplication.run(SolrIndexer.class, args); + SpringApplication.exit(SpringApplication.run(SolrIndexer.class, args)); } }