{"id":12922,"date":"2013-05-23T13:00:30","date_gmt":"2013-05-23T10:00:30","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=12922"},"modified":"2013-05-22T10:59:27","modified_gmt":"2013-05-22T07:59:27","slug":"spring-data-solr-tutorial-configuration","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html","title":{"rendered":"Spring Data Solr Tutorial: Configuration"},"content":{"rendered":"<p>In the <a href=\"http:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html\">previous part<\/a> of my Spring Data Solr tutorial, we learned that Solr provides a REST-like HTTP API which can be used to add information to Solr index and execute queries against indexed data. The problem is that running a separate Solr instance in a development environment is a bit cumbersome.<\/p>\n<p>However, not all hope is lost because Solr provides two alternative server implementations which we can use in our applications. These implementations are described in the following:<\/p>\n<ul>\n<li>The <a href=\"http:\/\/wiki.apache.org\/solr\/Solrj#EmbeddedSolrServer\" target=\"_blank\">embedded Solr server<\/a> connects directly to Solr core. We can use this server for development purposes but we must also remember that <a href=\"http:\/\/wiki.apache.org\/solr\/EmbeddedSolr\" target=\"_blank\"><br \/>\n&nbsp;<br \/>\nusing it in production environment is not recommended<\/a>. However, using the embedded Solr server is still a viable option in the development environment.<\/li>\n<li>The <a href=\"http:\/\/wiki.apache.org\/solr\/Solrj#HttpSolrServer\" target=\"_blank\">HTTP Solr server<\/a> connects to an external Solr server by using HTTP. This is the recommended way of using the Solr search server and that is why we should always use it in the production environment.<\/li>\n<\/ul>\n<p>This blog entry describes how we can get the required dependencies with Maven. We also learn to configure the Spring Data Solr to use the embedded Solr server in the development environment and the HTTP Solr server in the production environment.<\/p>\n<p><strong>Note<\/strong>: These blog entries provides additional information which helps us to understand the concepts described in this blog entry:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.petrikainulainen.net\/programming\/maven\/running-solr-with-maven\/\">Running Solr with Maven<\/a><\/li>\n<li><a href=\"http:\/\/www.petrikainulainen.net\/programming\/solr\/spring-data-solr-tutorial-introduction-to-solr\/\">Spring Data Solr Tutorial: Introduction to Solr<\/a><\/li>\n<\/ul>\n<p>Let\u2019s get started.<\/p>\n<h2>Getting the Required Dependencies with Maven<\/h2>\n<p>We can get the required dependencies with Maven by following these steps:<\/p>\n<ol>\n<li>Add the Spring Milestone Maven repository to the POM file.<\/li>\n<li>Add the required dependencies to the pom.xml file.<\/li>\n<\/ol>\n<p>Both of these steps are described with more details in the following.<\/p>\n<h4>Adding the Spring Milestone Maven Repository to the POM File<\/h4>\n<p>We can add the Spring milestone Maven repository to our POM file by adding the following XML to the <em>pom.xml<\/em> file:<\/p>\n<pre class=\"brush:xml\">&lt;repositories&gt;\r\n    &lt;repository&gt;\r\n        &lt;id&gt;spring-milestone&lt;\/id&gt;\r\n        &lt;name&gt;Spring Milestone Maven Repository&lt;\/name&gt;\r\n        &lt;url&gt;http:\/\/repo.springsource.org\/libs-milestone&lt;\/url&gt;\r\n    &lt;\/repository&gt;\r\n&lt;\/repositories&gt;<\/pre>\n<h4>Adding the Required Dependencies to the POM File<\/h4>\n<p>We can add the required dependencies to the POM file by following these steps:<\/p>\n<ol>\n<li>Add the Spring Data Solr dependency (version 1.0.0.RC1) to the dependencies section of our POM file.<\/li>\n<li>Add the Solr core dependency (version 4.1.0) to the dependencies section of our POM file and exclude the SLF4J JDK14 binding. Because Solr core is required by the embedded Solr server, we can skip this step if we are not using the embedded Solr server.<\/li>\n<\/ol>\n<p>We can complete these steps by adding the following XML to the dependencies section of the POM file:<\/p>\n<pre class=\"brush:xml\">&lt;!-- Spring Data Solr --&gt;\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;org.springframework.data&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;spring-data-solr&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.0.0.RC1&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n\r\n&lt;!-- Required by embedded solr server --&gt;\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;org.apache.solr&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;solr-core&lt;\/artifactId&gt;\r\n    &lt;version&gt;4.1.0&lt;\/version&gt;\r\n    &lt;exclusions&gt;\r\n        &lt;exclusion&gt;\r\n            &lt;artifactId&gt;slf4j-jdk14&lt;\/artifactId&gt;\r\n            &lt;groupId&gt;org.slf4j&lt;\/groupId&gt;\r\n        &lt;\/exclusion&gt;\r\n    &lt;\/exclusions&gt;\r\n&lt;\/dependency&gt;<\/pre>\n<h2>Configuring Spring Data Solr<\/h2>\n<p>This section describes how we can configure Spring Data Solr to use different Solr servers in the development and production environment. We will use the embedded Solr server in the development environment and the HTTP Solr server in the production environment.<\/p>\n<p>We can configure Spring Data Solr by following these steps:<\/p>\n<ol>\n<li>Create a properties file.<\/li>\n<li>Configure the embedded Solr server.<\/li>\n<li>Configure the HTTP Solr server.<\/li>\n<li>Set the active bean definition profile.<\/li>\n<\/ol>\n<p>These steps are described with more details in the following subsections.<\/p>\n<h4>Creating the Properties File<\/h4>\n<p>The name of our properties file is <em>application.properties<\/em> and we will use it to configure two properties which are described in the following:<\/p>\n<ul>\n<li>The <em>solr.server.url<\/em> property specifies the url of the used Solr server. The value of this property is used to configure the HTTP Solr server which is used in the production environment.<\/li>\n<li>The <em>solr.solr.home<\/em> configures the home directory of Solr. The value of this property is used to configure the home directory of the embedded Solr server which is used in the development environment.<\/li>\n<\/ul>\n<p>The content of the <em>application.properties<\/em> file looks as follows:<\/p>\n<pre class=\"brush:bash\">solr.server.url=http:\/\/localhost:8983\/solr\/\r\nsolr.solr.home=<\/pre>\n<h4>Configuring the Embedded Solr Server<\/h4>\n<p>This subsection describes how we can configure Spring Data Solr to use the embedded Solr server in the development environment.<\/p>\n<h2>Java Configuration<\/h2>\n<p>We can create a configuration class which configures the embedded Solr server by following these steps:<\/p>\n<ol>\n<li>Create a class called <em>EmbeddedSolrContext<\/em> and annotate that class with the <em>@Configuration<\/em> annotation.<\/li>\n<li>Enable Spring Data Solr repositories by annotating that class with the <em>@EnableSolrRepositories<\/em> annotation and configuring the root package of our Solr repositories.<\/li>\n<li>Annotate the created class with the <em><a href=\"http:\/\/static.springsource.org\/spring\/docs\/3.2.x\/javadoc-api\/org\/springframework\/context\/annotation\/Profile.html\" target=\"_blank\">@Profile annotation<\/a><\/em> and set its value to \u2018dev\u2019. This means that this configuration class is bypassed unless the \u2018dev\u2019 profile have been activated.<\/li>\n<li>Annotate the class with the <em>@PropertySource<\/em> annotation and set its value to \u2018classpath:application.properties\u2019. This configures the location of our property file and adds a <em><a href=\"http:\/\/static.springsource.org\/spring\/docs\/3.2.x\/javadoc-api\/org\/springframework\/core\/env\/PropertySource.html\" target=\"_blank\">PropertySource<\/a><\/em> to Spring\u2019s <em><a href=\"http:\/\/static.springsource.org\/spring\/docs\/3.2.x\/javadoc-api\/org\/springframework\/core\/env\/Environment.html\" target=\"_blank\">Environment<\/a><\/em>.<\/li>\n<li>Add an <em>Environment<\/em> field to the class and annotate that field with the <em>@Resource<\/em> annotation. The injected <em>Environment<\/em> is used to access the properties which we added to our properties file.<\/li>\n<li>Create a method called <em>solrServerFactoryBean()<\/em> and annotate this method with the <em>@Bean<\/em> annotation. The implementation of this method creates a new <em>EmbeddedSolrServerFactoryBean<\/em> object, sets the value of the Solr home and returns the created object.<\/li>\n<li>Create a method called <em>solrTemplate()<\/em> and annotate this method with the <em>@Bean<\/em> annotation. The implementation of this method creates a new <em>SolrTemplate<\/em> object and passes the used <em>SolrServer<\/em> implementation as a constructor argument.<\/li>\n<\/ol>\n<p>The source code of the <em>EmbeddedSolrContext<\/em> class looks as follows:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:java\">import org.springframework.context.annotation.Bean;\r\nimport org.springframework.context.annotation.Configuration;\r\nimport org.springframework.context.annotation.Profile;\r\nimport org.springframework.core.env.Environment;\r\nimport org.springframework.data.solr.core.SolrTemplate;\r\nimport org.springframework.data.solr.repository.config.EnableSolrRepositories;\r\nimport org.springframework.data.solr.server.support.EmbeddedSolrServerFactoryBean;\r\n\r\nimport javax.annotation.Resource;\r\n\r\n@Configuration\r\n@EnableSolrRepositories(\"net.petrikainulainen.spring.datasolr.todo.repository.solr\")\r\n@Profile(\"dev\")\r\n@PropertySource(\"classpath:application.properties\")\r\npublic class EmbeddedSolrContext {\r\n\r\n    @Resource\r\n    private Environment environment;\r\n\r\n    @Bean\r\n    public EmbeddedSolrServerFactoryBean solrServerFactoryBean() {\r\n        EmbeddedSolrServerFactoryBean factory = new EmbeddedSolrServerFactoryBean();\r\n\r\n        factory.setSolrHome(environment.getRequiredProperty(\"solr.solr.home\"));\r\n\r\n        return factory;\r\n    }\r\n\r\n    @Bean\r\n    public SolrTemplate solrTemplate() throws Exception {\r\n        return new SolrTemplate(solrServerFactoryBean().getObject());\r\n    }\r\n}<\/pre>\n<h2>XML Configuration<\/h2>\n<p>We can create an XML configuration file for the embedded Solr server by following these steps:<\/p>\n<ol>\n<li>Configure the used properties file by using the <em>property-placeholder<\/em> element of the <em>context<\/em> namespace.<\/li>\n<li>Enable Solr repositories and configure the base package of our Solr repositories by using the <em>repositories<\/em> element of the <em>solr<\/em> namespace.<\/li>\n<li>Create a bean configuration for the development profile.<\/li>\n<li>Configure the embedded Solr server bean by using the <em>embedded-solr-server<\/em> element of the <em>solr<\/em> namespace. Set the value of the Solr home.<\/li>\n<li>Configure the Solr template bean. Set the configured embedded Solr server bean as constructor argument.<\/li>\n<\/ol>\n<p>The contents of the <em>exampleApplicationContext-solr.xml<\/em> file looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;beans xmlns=\"http:\/\/www.springframework.org\/schema\/beans\"\r\n      xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n      xmlns:context=\"http:\/\/www.springframework.org\/schema\/context\"\r\n      xmlns:solr=\"http:\/\/www.springframework.org\/schema\/data\/solr\"\r\n      xsi:schemaLocation=\"http:\/\/www.springframework.org\/schema\/beans http:\/\/www.springframework.org\/schema\/beans\/spring-beans.xsd\r\n      http:\/\/www.springframework.org\/schema\/context http:\/\/www.springframework.org\/schema\/context\/spring-context-3.2.xsd http:\/\/www.springframework.org\/schema\/data\/solr http:\/\/www.springframework.org\/schema\/data\/solr\/spring-solr.xsd\"&gt;\r\n\r\n    &lt;context:property-placeholder location=\"classpath:application.properties\"\/&gt;\r\n\r\n    &lt;!-- Enable Solr repositories and configure repository base package --&gt;\r\n    &lt;solr:repositories base-package=\"net.petrikainulainen.spring.datasolr.todo.repository.solr\"\/&gt;\r\n\r\n    &lt;!-- Bean definitions for the dev profile --&gt;\r\n    &lt;beans profile=\"dev\"&gt;\r\n        &lt;!-- Configures embedded Solr server --&gt;\r\n        &lt;solr:embedded-solr-server id=\"solrServer\" solrHome=\"${solr.solr.home}\"\/&gt;\r\n\r\n        &lt;!-- Configures Solr template --&gt;\r\n        &lt;bean id=\"solrTemplate\" class=\"org.springframework.data.solr.core.SolrTemplate\"&gt;\r\n            &lt;constructor-arg index=\"0\" ref=\"solrServer\"\/&gt;\r\n        &lt;\/bean&gt;\r\n    &lt;\/beans&gt;\r\n\r\n    &lt;!-- Bean definitions for the prod profile are omitted --&gt;\r\n&lt;\/beans&gt;<\/pre>\n<h4>Configuring the Http Solr Server<\/h4>\n<p>This subsection describes how we can configure Spring Data Solr to use the HTTP Solr server in the production environment.<\/p>\n<h2>Java Configuration<\/h2>\n<p>We can create a configuration class which configures the HTTP Solr server by following these steps:<\/p>\n<ol>\n<li>Create a class called <em>HttpSolrContext<\/em> and annotate that class with the <em>@Configuration<\/em> annotation.<\/li>\n<li>Enable Spring Data Solr repositories by annotating that class with the <em>@EnableSolrRepositories<\/em> annotation and configuring the root package of our Solr repositories.<\/li>\n<li>Annotate the created class with a <em><a href=\"http:\/\/static.springsource.org\/spring\/docs\/3.2.x\/javadoc-api\/org\/springframework\/context\/annotation\/Profile.html\" target=\"_blank\">@Profile annotation<\/a><\/em> and set its value to \u2018prod\u2019. This means that this configuration class is bypassed unless the \u2018prod\u2019 profile have been activated.<\/li>\n<li>Annotate the class with the <em>@PropertySource<\/em> annotation and set its value to \u2018classpath:application.properties\u2019. This configures the location of our property file and adds a <em><a href=\"http:\/\/static.springsource.org\/spring\/docs\/3.2.x\/javadoc-api\/org\/springframework\/core\/env\/PropertySource.html\" target=\"_blank\">PropertySource<\/a><\/em> to Spring\u2019s <em><a href=\"http:\/\/static.springsource.org\/spring\/docs\/3.2.x\/javadoc-api\/org\/springframework\/core\/env\/Environment.html\" target=\"_blank\">Environment<\/a><\/em>.<\/li>\n<li>Add an <em>Environment<\/em> field to the class and annotate that field with the <em>@Resource<\/em> annotation. The injected <em>Environment<\/em> is used to access the properties which we added to our properties file.<\/li>\n<li>Create a method called <em>solrServerFactoryBean()<\/em> and annotate this method with the <em>@Bean<\/em> annotation. The implementation of this method create a new <em>HttpSolrServerFactoryBean<\/em> object, sets the value of the Solr server url and returns the created object.<\/li>\n<li>Create a method called <em>solrTemplate()<\/em> and annotate this method with the <em>@Bean<\/em> annotation. The implementation of this method creates a new <em>SolrTemplate<\/em> object and passes the used <em>SolrServer<\/em> implementation as a constructor argument.<\/li>\n<\/ol>\n<p>The source code of the <em>HttpSolrContext<\/em> class looks as follows:<\/p>\n<pre class=\"brush:java\">import org.springframework.context.annotation.Bean;\r\nimport org.springframework.context.annotation.Configuration;\r\nimport org.springframework.context.annotation.Profile;\r\nimport org.springframework.core.env.Environment;\r\nimport org.springframework.data.solr.core.SolrTemplate;\r\nimport org.springframework.data.solr.repository.config.EnableSolrRepositories;\r\nimport org.springframework.data.solr.server.support.HttpSolrServerFactoryBean;\r\n\r\nimport javax.annotation.Resource;\r\n\r\n@Configuration\r\n@EnableSolrRepositories(\"net.petrikainulainen.spring.datasolr.todo.repository.solr\")\r\n@Profile(\"prod\")\r\n@PropertySource(\"classpath:application.properties\")\r\npublic class HttpSolrContext {\r\n\r\n    @Resource\r\n    private Environment environment;\r\n\r\n    @Bean\r\n    public HttpSolrServerFactoryBean solrServerFactoryBean() {\r\n        HttpSolrServerFactoryBean factory = new HttpSolrServerFactoryBean();\r\n\r\n        factory.setUrl(environment.getRequiredProperty(\"solr.server.url\"));\r\n\r\n        return factory;\r\n    }\r\n\r\n    @Bean\r\n    public SolrTemplate solrTemplate() throws Exception {\r\n        return new SolrTemplate(solrServerFactoryBean().getObject());\r\n    }\r\n}<\/pre>\n<h2>XML Configuration<\/h2>\n<p>We can create an XML configuration file for the HTTP Solr server by following these steps:<\/p>\n<ol>\n<li>Configure the used properties file by using the <em>property-placeholder<\/em> element of the <em>context<\/em> namespace.<\/li>\n<li>Enable Solr repositories and configure the base package of our Solr repositories by using the <em>repositories<\/em> element of the <em>solr<\/em> namespace.<\/li>\n<li>Create a bean configuration for the production profile.<\/li>\n<li>Configure the HTTP Solr server bean by using the <em>solr-server<\/em> element of the <em>solr<\/em> namespace. Set the url of the Solr server.<\/li>\n<li>Configure the Solr template bean. Set the configured HTTP Solr server bean as a constructor argument.<\/li>\n<\/ol>\n<p>The content of the <em>exampleApplicationContext-solr.xml<\/em> file looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;beans xmlns=\"http:\/\/www.springframework.org\/schema\/beans\"\r\n      xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n      xmlns:context=\"http:\/\/www.springframework.org\/schema\/context\"\r\n      xmlns:solr=\"http:\/\/www.springframework.org\/schema\/data\/solr\"\r\n      xsi:schemaLocation=\"http:\/\/www.springframework.org\/schema\/beans http:\/\/www.springframework.org\/schema\/beans\/spring-beans.xsd\r\n      http:\/\/www.springframework.org\/schema\/context http:\/\/www.springframework.org\/schema\/context\/spring-context-3.2.xsd http:\/\/www.springframework.org\/schema\/data\/solr http:\/\/www.springframework.org\/schema\/data\/solr\/spring-solr.xsd\"&gt;\r\n\r\n    &lt;context:property-placeholder location=\"classpath:application.properties\"\/&gt;\r\n\r\n    &lt;!-- Enable Solr repositories and configure repository base package --&gt;\r\n    &lt;solr:repositories base-package=\"net.petrikainulainen.spring.datasolr.todo.repository.solr\"\/&gt;\r\n\r\n    &lt;!-- Bean definitions for the dev profile are omitted --&gt;\r\n\r\n    &lt;!-- Bean definitions for the prod profile --&gt;\r\n    &lt;beans profile=\"prod\"&gt;\r\n        &lt;!-- Configures HTTP Solr server --&gt;\r\n        &lt;solr:solr-server id=\"solrServer\" url=\"${solr.server.url}\"\/&gt;\r\n\r\n        &lt;!-- Configures Solr template --&gt;\r\n        &lt;bean id=\"solrTemplate\" class=\"org.springframework.data.solr.core.SolrTemplate\"&gt;\r\n            &lt;constructor-arg index=\"0\" ref=\"solrServer\"\/&gt;\r\n        &lt;\/bean&gt;\r\n    &lt;\/beans&gt;\r\n&lt;\/beans&gt;<\/pre>\n<h4>Setting the Active Bean Definition Profile<\/h4>\n<p>We can select the active bean definition profile by setting the value of the <em>spring.profiles.active<\/em> system variable. The allowed values of this system variable (in the context of our example application) are described in the following:<\/p>\n<ul>\n<li>We can configure our application to run in the development profile by setting the value of the <em>spring.profiles.active<\/em> system variable to \u2018dev\u2019.<\/li>\n<li>When we want configure our application to run in the production profile, we have to set the of the <em>spring.profiles.active<\/em> system variable to \u2018prod\u2019.<\/li>\n<\/ul>\n<p>We can configure our example application to support both profiles by following these steps:<\/p>\n<ol>\n<li>Add required profiles to the POM file.<\/li>\n<li>Create the profile specific properties files for system properties.<\/li>\n<li>Configure the Jetty Maven plugin.<\/li>\n<\/ol>\n<p>These steps are described with more details in the following.<\/p>\n<h2>Adding the Required Profiles to the POM File<\/h2>\n<p>We can add the required profiles to our Maven build by following these steps:<\/p>\n<ol>\n<li>Create a profile for development environment. Set the <em>id<\/em> of this profile to \u2018dev\u2019 and set the value of the <em>build.profile.id<\/em> property to \u2018dev\u2019.<\/li>\n<li>Create a profile for the production environment. Set the <em>id<\/em> of this profile to \u2018prod\u2019 and set the value of the <em>build.profile.id<\/em> property to \u2018prod\u2019.<\/li>\n<\/ol>\n<p>The configuration of our Maven profiles looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;profiles&gt;\r\n    &lt;profile&gt;\r\n        &lt;id&gt;dev&lt;\/id&gt;\r\n        &lt;properties&gt;\r\n            &lt;build.profile.id&gt;dev&lt;\/build.profile.id&gt;\r\n        &lt;\/properties&gt;\r\n    &lt;\/profile&gt;\r\n    &lt;profile&gt;\r\n        &lt;id&gt;prod&lt;\/id&gt;\r\n        &lt;properties&gt;\r\n            &lt;build.profile.id&gt;prod&lt;\/build.profile.id&gt;\r\n        &lt;\/properties&gt;\r\n    &lt;\/profile&gt;\r\n&lt;\/profiles&gt;<\/pre>\n<h2>Creating the Profile Specific Properties Files for System Properties<\/h2>\n<p>The profile specific properties files are located in the sub directories of the <em>profiles<\/em> directory. The name of each sub directory matches with the values of the <em>build.profile.id<\/em> properties configured in the <em>pom.xml<\/em> file.<\/p>\n<p>We can create the profile specific properties files for system properties by following these steps:<\/p>\n<ol>\n<li>Create a properties file called <em>system.properties<\/em> to the <em>profiles\/dev<\/em> directory. This properties file contains the system properties of the development profile.<\/li>\n<li>Create a properties file called <em>system.properties<\/em> to the <em>profiles\/prod<\/em> directory. This properties file contains the system properties of the production profile.<\/li>\n<\/ol>\n<p>The content of the properties file used to configure the system properties of the development profile looks as follows:<\/p>\n<pre class=\"brush:bash\">spring.profiles.active=dev<\/pre>\n<p>The content of the properties file used to configure the system properties of the production profile looks as follows:<\/p>\n<pre class=\"brush:bash\">spring.profiles.active=prod<\/pre>\n<h2>Configuring the Jetty Maven Plugin<\/h2>\n<p>We can configure the <a href=\"http:\/\/wiki.eclipse.org\/Jetty\/Feature\/Jetty_Maven_Plugin\" target=\"_blank\">Jetty Maven plugin<\/a> by following these steps:<\/p>\n<ol>\n<li>Add the plugin declaration of the Jetty Maven plugin to the <em>plugins<\/em> section of our Pom file.<\/li>\n<li>Configure the <em>stopKey<\/em> and stopPort of the Jetty Maven plugin.<\/li>\n<li>Configure the location of the properties file containing the used system properties.<\/li>\n<\/ol>\n<p>The configuration of the Jetty Maven plugin looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;plugin&gt;\r\n     &lt;groupId&gt;org.mortbay.jetty&lt;\/groupId&gt;\r\n     &lt;artifactId&gt;jetty-maven-plugin&lt;\/artifactId&gt;\r\n     &lt;version&gt;8.1.5.v20120716&lt;\/version&gt;\r\n     &lt;configuration&gt;\r\n         &lt;stopKey&gt;todostop&lt;\/stopKey&gt;\r\n         &lt;stopPort&gt;9999&lt;\/stopPort&gt;\r\n         &lt;systemPropertiesFile&gt;${project.basedir}\/profiles\/${build.profile.id}\/system.properties&lt;\/systemPropertiesFile&gt;\r\n     &lt;\/configuration&gt;\r\n &lt;\/plugin&gt;<\/pre>\n<h2>Summary<\/h2>\n<p>We have now successfully obtained the required dependencies with Maven and configured Spring Data Solr. This blog entry has taught us four things:<\/p>\n<ul>\n<li>We learned to get the required dependencies with Maven.<\/li>\n<li>We know that we should use the embedded Solr server only in the development environment and learned how we can configure Spring Data Solr to use it.<\/li>\n<li>We learned that we should always use the HTTP Solr server in the production environment and know how we can configure Spring Data Solr to use it.<\/li>\n<li>We know how we can use the bean definition profiles of Spring Framework for creating different configurations for development and production environment.<\/li>\n<\/ul>\n<p>The <a href=\"http:\/\/www.petrikainulainen.net\/programming\/solr\/spring-data-solr-tutorial-crud-almost\/\">next part<\/a> of my Spring Data Solr tutorial describes how we can add new document to Solr index, update the information of an existing documents and delete documents from the Solr index.<\/p>\n<p>PS. The example application of this blog entry is available at <a href=\"https:\/\/github.com\/pkainulainen\/spring-data-solr-examples\/tree\/master\/query-methods\" target=\"_blank\">Github<\/a>.<br \/>\n&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/www.petrikainulainen.net\/programming\/solr\/spring-data-solr-tutorial-configuration\/\">Spring Data Solr Tutorial: Configuration<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Petri Kainulainen at the <a href=\"http:\/\/www.petrikainulainen.net\/\">Petri Kainulainen<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In the previous part of my Spring Data Solr tutorial, we learned that Solr provides a REST-like HTTP API which can be used to add information to Solr index and execute queries against indexed data. The problem is that running a separate Solr instance in a development environment is a bit cumbersome. However, not all &hellip;<\/p>\n","protected":false},"author":429,"featured_media":80,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[470,30,321],"class_list":["post-12922","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-solr","tag-spring","tag-spring-data"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Data Solr Tutorial: Configuration<\/title>\n<meta name=\"description\" content=\"In the previous part of my Spring Data Solr tutorial, we learned that Solr provides a REST-like HTTP API which can be used to add information to Solr\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Data Solr Tutorial: Configuration\" \/>\n<meta property=\"og:description\" content=\"In the previous part of my Spring Data Solr tutorial, we learned that Solr provides a REST-like HTTP API which can be used to add information to Solr\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-23T10:00:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Petri Kainulainen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/petrikainulaine\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Petri Kainulainen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html\"},\"author\":{\"name\":\"Petri Kainulainen\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5af4df3fdfeb79e9fa3598d79bff2c9e\"},\"headline\":\"Spring Data Solr Tutorial: Configuration\",\"datePublished\":\"2013-05-23T10:00:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html\"},\"wordCount\":1933,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-solr-logo.jpg\",\"keywords\":[\"Apache Solr\",\"Spring\",\"Spring Data\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html\",\"name\":\"Spring Data Solr Tutorial: Configuration\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-solr-logo.jpg\",\"datePublished\":\"2013-05-23T10:00:30+00:00\",\"description\":\"In the previous part of my Spring Data Solr tutorial, we learned that Solr provides a REST-like HTTP API which can be used to add information to Solr\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-solr-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-solr-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-configuration.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Data Solr Tutorial: Configuration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5af4df3fdfeb79e9fa3598d79bff2c9e\",\"name\":\"Petri Kainulainen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g\",\"caption\":\"Petri Kainulainen\"},\"description\":\"Petri is passionate about software development and continuous improvement. He is specialized in software development with the Spring Framework and is the author of Spring Data book.\",\"sameAs\":[\"http:\\\/\\\/www.petrikainulainen.net\\\/\",\"http:\\\/\\\/www.linkedin.com\\\/in\\\/petrikainulainen\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/petrikainulaine\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/petri-kainulainen\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Data Solr Tutorial: Configuration","description":"In the previous part of my Spring Data Solr tutorial, we learned that Solr provides a REST-like HTTP API which can be used to add information to Solr","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html","og_locale":"en_US","og_type":"article","og_title":"Spring Data Solr Tutorial: Configuration","og_description":"In the previous part of my Spring Data Solr tutorial, we learned that Solr provides a REST-like HTTP API which can be used to add information to Solr","og_url":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-05-23T10:00:30+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","type":"image\/jpeg"}],"author":"Petri Kainulainen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/petrikainulaine","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Petri Kainulainen","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html"},"author":{"name":"Petri Kainulainen","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5af4df3fdfeb79e9fa3598d79bff2c9e"},"headline":"Spring Data Solr Tutorial: Configuration","datePublished":"2013-05-23T10:00:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html"},"wordCount":1933,"commentCount":3,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","keywords":["Apache Solr","Spring","Spring Data"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html","url":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html","name":"Spring Data Solr Tutorial: Configuration","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","datePublished":"2013-05-23T10:00:30+00:00","description":"In the previous part of my Spring Data Solr tutorial, we learned that Solr provides a REST-like HTTP API which can be used to add information to Solr","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-configuration.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Data Solr Tutorial: Configuration"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5af4df3fdfeb79e9fa3598d79bff2c9e","name":"Petri Kainulainen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g","caption":"Petri Kainulainen"},"description":"Petri is passionate about software development and continuous improvement. He is specialized in software development with the Spring Framework and is the author of Spring Data book.","sameAs":["http:\/\/www.petrikainulainen.net\/","http:\/\/www.linkedin.com\/in\/petrikainulainen","https:\/\/x.com\/https:\/\/twitter.com\/petrikainulaine"],"url":"https:\/\/www.javacodegeeks.com\/author\/petri-kainulainen"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/12922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/429"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=12922"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/12922\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/80"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=12922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=12922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=12922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}