1. How to configure the spring DATASOLR in the development environment to use the embedded SOLR Server
According to the official Case Project (Spring-data-book), find the class with embedded, that is, the use of embedded solrserver, the advantage: You can learn to use spring data SOLR without having to configure the environment yourself, Note: In this class, within the function that is @after annotated, contains the delete data and closes Embeddedsolrserver.
2. Create an embedded Solrserver
Very simple, first on the official web download Source: Spring-data-solr-master, just find the test source package inside the small Demo:abstractitestwithembedde Dsolrserver.java, and analysis, you can get a set of independent operation of the source files, respectively, including the Red Line part:
Note: inline solrserver are typically used only for testing, because inline solrserver need to be closed manually, and can be closed in junit @after in the test
Spring data SOLR uses an inline SOLR server (single core)