Spring Data Solr

Spring Data Solr CRUD Application Spring Boot

<p>In this article&comma; I will discuss an example of the Spring Data Solr CRUD Application using Spring Boot&period; I have already discussed the Spring Data Solr such <strong><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;installing-configuring-apache-solr&sol;">how to install Apache Solr<&sol;a><&sol;strong> and how to <strong><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-data-solr-configuration-using-spring-boot&sol;">configure the Spring Data Solr<&sol;a><&sol;strong> to your spring application&period;<&sol;p>&NewLine;<p>Spring Data provides an easy and very generic way to create the repositories for each technology such as Solr&comma; Cassandra&comma; MongoDB&comma; JPA etc&period; In <strong><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-data-solr-tutorial&sol;">Spring Data Solr tutorial<&sol;a><&sol;strong>&comma; I have discussed how to <strong><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;creating-spring-data-solr-repositories&sol;">create Spring Data Solr repositories<&sol;a><&sol;strong> using Spring Data interface or custom repository creation without using Spring Data repository interface&period; Also&comma; we have learned to create <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-data-solr-dynamic-queries&sol;"><strong>dynamic Solr queries<&sol;strong><&sol;a> and <strong><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-data-solr-sorting-with-example&sol;">sorting the Solr query results<&sol;a><&sol;strong>&period; And how to render this <strong><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-data-solr-pagination-example&sol;">Solr query result with pagination<&sol;a><&sol;strong>&period;<&sol;p>&NewLine;<p><img class&equals;"aligncenter size-full wp-image-4171" src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2018&sol;06&sol;Spring-Boot-Solr-Example&period;jpg" alt&equals;"Spring Data Solr CRUD Application" width&equals;"567" height&equals;"175" &sol;><&sol;p>&NewLine;<p>Let&&num;8217&semi;s create an application with CRUD operation using Spring Data Solr and Spring Boot&period;<&sol;p>&NewLine;<h2>Spring Data Solr CRUD Application<&sol;h2>&NewLine;<p>As we know that the Apache Solr is an open source ready to deploy enterprise full-text search engine&period; But in this article&comma; I will show you how to do a simple Solr configuration and how to interact with the Solr server&period; Let&&num;8217&semi;s first <strong><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;installing-configuring-apache-solr&sol;">start the Solr server<&sol;a> <&sol;strong>as we have configured in the previous articles as the following diagram&colon;<&sol;p>&NewLine;<p><img class&equals;"aligncenter size-full wp-image-4220" src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2018&sol;09&sol;start-solr&period;png" alt&equals;"start solr" width&equals;"467" height&equals;"128" &sol;><&sol;p>&NewLine;<p>As you can see in the above diagram&comma; the Solr server is started now and running at the 8983 port&period; You can see the running Solr by launching the Solr Admin UI in your web browser&colon; <strong><a href&equals;"http&colon;&sol;&sol;localhost&colon;8983&sol;solr&sol;" rel&equals;"noopener">http&colon;&sol;&sol;localhost&colon;8983&sol;solr&sol;<&sol;a><&sol;strong> as the following&colon;<&sol;p>&NewLine;<p><img class&equals;"aligncenter size-full wp-image-4162" src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2018&sol;06&sol;running-solr&period;png" alt&equals;"running solr" width&equals;"1147" height&equals;"639" &sol;><&sol;p>&NewLine;<p>You can see the above diagram of the Solr server admin dashboard&period; Finally&comma; you can create the collections in the Solr server&period; And we will use these collections into our application for CRUD operations&period; Let&&num;8217&semi;s create collections by using the following command&period;<&sol;p>&NewLine;<pre class&equals;"highlight">bin&bsol;solr create -c Order<&sol;pre>&NewLine;<p>After creating the Order collection&comma; let’s move to index this collection with Data using application&period;<&sol;p>&NewLine;<h3>Adding Spring Data to application<&sol;h3>&NewLine;<p>Spring team has created Spring Data projects to simplify DAO layer implementation and removing boilerplate codes&period; Like other Spring Data project&period; Spring Data Solr is also created for removing boilerplate codes and simplifying DAO implementation in the spring application&period; Let&&num;8217&semi;s see how to add Spring Data Solr in your application by using the following Maven and Gradle dependency&period;<&sol;p>&NewLine;<p><strong>Maven Dependency<&sol;strong><br &sol;>&NewLine;Let’s start by adding the Spring Data Solr dependency on our pom&period;xml&colon;<&sol;p>&NewLine;<pre class&equals;"highlight"> &NewLine;&lt&semi;dependency&gt&semi; &NewLine; &lt&semi;groupId&gt&semi;org&period;springframework&period;data&lt&semi;&sol;groupId&gt&semi; &NewLine; &lt&semi;artifactId&gt&semi;spring-data-solr&lt&semi;&sol;artifactId&gt&semi; &NewLine; &lt&semi;version&gt&semi;3&period;0&period;10&period;RELEASE&lt&semi;&sol;version&gt&semi; &NewLine;&lt&semi;&sol;dependency&gt&semi; &NewLine;<&sol;pre>&NewLine;<p><strong>Gradle Dependency<&sol;strong><br &sol;>&NewLine;Let’s start by adding the Spring Data Solr dependency on our build&period;gradle&colon;<&sol;p>&NewLine;<pre class&equals;"highlight"> &NewLine;&lbrace; &NewLine;compile group&colon; 'org&period;springframework&period;data'&comma; name&colon; 'spring-data-solr'&comma; version&colon; '3&period;0&period;10&period;RELEASE' &NewLine;&rcub; &NewLine;<&sol;pre>&NewLine;<p>You can configure the <a href&equals;"https&colon;&sol;&sol;mvnrepository&period;com&sol;artifact&sol;org&period;springframework&period;data&sol;spring-data-solr" rel&equals;"noopener">latest dependency<&sol;a> of the Spring Data Solr project in your application&period; Next&comma; let&&num;8217&semi;s define a document class for the Order collection in this application&period;<&sol;p>&NewLine;<h3>Defining the Document Class<&sol;h3>&NewLine;<p>In this application&comma; we are using Order collection&comma; so&comma; let&&num;8217&semi;s define a document called Order as the following class&colon;<&sol;p>&NewLine;<pre class&equals;"highlight"> &NewLine;package com&period;doj&period;app&period;pojo&semi; &NewLine; &NewLine;import org&period;springframework&period;data&period;annotation&period;Id&semi; &NewLine;import org&period;springframework&period;data&period;solr&period;core&period;mapping&period;Indexed&semi; &NewLine;import org&period;springframework&period;data&period;solr&period;core&period;mapping&period;SolrDocument&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine;&ast; &commat;author Dinesh&period;Rajput &NewLine;&ast; &NewLine;&ast;&sol; &NewLine;&commat;SolrDocument&lpar;collection&equals;"Order"&rpar; &NewLine;public class Order &lbrace; &NewLine; &NewLine;&commat;Id &NewLine;&commat;Indexed&lpar;name &equals; "oid"&comma; type &equals; "long"&rpar; &NewLine;private Long orderid&semi; &NewLine; &NewLine;&commat;Indexed&lpar;name &equals; "oname"&comma; type &equals; "string"&rpar; &NewLine;private String orderName&semi; &NewLine; &NewLine;&commat;Indexed&lpar;name &equals; "odesc"&comma; type &equals; "string"&rpar; &NewLine;private String orderDescription&semi; &NewLine; &NewLine;&commat;Indexed&lpar;name &equals; "pname"&comma; type &equals; "string"&rpar; &NewLine;private String productName&semi; &NewLine; &NewLine;&commat;Indexed&lpar;name &equals; "cname"&comma; type &equals; "string"&rpar; &NewLine;private String customerName&semi; &NewLine; &NewLine;&commat;Indexed&lpar;name &equals; "cmobile"&comma; type &equals; "string"&rpar; &NewLine;private String customerMobile&semi; &NewLine; &NewLine;public Long getOrderid&lpar;&rpar; &lbrace; &NewLine;return orderid&semi; &NewLine;&rcub; &NewLine; &NewLine;public void setOrderid&lpar;Long orderid&rpar; &lbrace; &NewLine;this&period;orderid &equals; orderid&semi; &NewLine;&rcub; &NewLine; &NewLine;public String getOrderName&lpar;&rpar; &lbrace; &NewLine;return orderName&semi; &NewLine;&rcub; &NewLine; &NewLine;public void setOrderName&lpar;String orderName&rpar; &lbrace; &NewLine;this&period;orderName &equals; orderName&semi; &NewLine;&rcub; &NewLine; &NewLine;public String getProductName&lpar;&rpar; &lbrace; &NewLine;return productName&semi; &NewLine;&rcub; &NewLine; &NewLine;public void setProductName&lpar;String productName&rpar; &lbrace; &NewLine;this&period;productName &equals; productName&semi; &NewLine;&rcub; &NewLine; &NewLine;public String getCustomerName&lpar;&rpar; &lbrace; &NewLine;return customerName&semi; &NewLine;&rcub; &NewLine; &NewLine;public void setCustomerName&lpar;String customerName&rpar; &lbrace; &NewLine;this&period;customerName &equals; customerName&semi; &NewLine;&rcub; &NewLine; &NewLine;public String getCustomerMobile&lpar;&rpar; &lbrace; &NewLine;return customerMobile&semi; &NewLine;&rcub; &NewLine; &NewLine;public void setCustomerMobile&lpar;String customerMobile&rpar; &lbrace; &NewLine;this&period;customerMobile &equals; customerMobile&semi; &NewLine;&rcub; &NewLine; &NewLine;public String getOrderDescription&lpar;&rpar; &lbrace; &NewLine;return orderDescription&semi; &NewLine;&rcub; &NewLine; &NewLine;public void setOrderDescription&lpar;String orderDescription&rpar; &lbrace; &NewLine;this&period;orderDescription &equals; orderDescription&semi; &NewLine;&rcub; &NewLine; &NewLine;&rcub; &NewLine;<&sol;pre>&NewLine;<p>In the above document class&comma; we have annotated this class <em>&commat;SolrDocument<&sol;em> annotation&period; This annotation indicates that the Order class is a Solr document and indexed to collection name Order&period; In this class&comma; you would notice&comma; the fields are annotated with <em>&commat;Indexed<&sol;em>&period; It indicates these fields will be indexed to the Order collection and will be searchable&period; Also&comma; a field of the Order class &&num;8220&semi;orderid&&num;8221&semi; is annotated with <em>&commat;Id<&sol;em> annotation&period; This means that the field &&num;8220&semi;orderid&&num;8221&semi; is like primary key of this a Solr document&period;<&sol;p>&NewLine;<p>In the next section&comma; I will define the Spring Data Solr repository interface for this application&period;<&sol;p>&NewLine;<h3>Defining Repository Interface<&sol;h3>&NewLine;<p>Let&&num;8217&semi;s create a repository interface for the Order Solr collection and this interface extending a repository provided by Spring Data Solr&period; As the given class below&colon;<&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;doj&period;app&period;repository&semi; &NewLine; &NewLine;import org&period;springframework&period;data&period;domain&period;Page&semi; &NewLine;import org&period;springframework&period;data&period;domain&period;Pageable&semi; &NewLine;import org&period;springframework&period;data&period;solr&period;repository&period;Query&semi; &NewLine;import org&period;springframework&period;data&period;solr&period;repository&period;SolrCrudRepository&semi; &NewLine; &NewLine;import com&period;doj&period;app&period;pojo&period;Order&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine;&ast; &commat;author Dinesh&period;Rajput &NewLine;&ast; &NewLine;&ast;&sol; &NewLine;public interface SolrOrderRepository extends SolrCrudRepository&lt&semi;Order&comma; Long&gt&semi; &lbrace; &NewLine; &NewLine;Order findByOrderid&lpar;Long orderid&rpar;&semi; &NewLine; &NewLine;&commat;Query&lpar;"odesc&colon;&ast;&quest;0&ast;"&rpar; &NewLine;Page&lt&semi;Order&gt&semi; findByOrderDescription&lpar;String searchTerm&comma; Pageable pageable&rpar;&semi; &NewLine; &NewLine;&commat;Query&lpar;"odesc&colon;&ast;&quest;0&ast; OR oname&colon;&ast;&quest;0&ast; OR pname&colon;&ast;&quest;0&ast;"&rpar; &NewLine;Page&lt&semi;Order&gt&semi; findByCustomerQuery&lpar;String searchTerm&comma; Pageable pageable&rpar;&semi; &NewLine; &NewLine;&rcub; &NewLine;<&sol;pre>&NewLine;<p>The above repository interface&comma; we have naturally parametrized this with Order and Long as our entity id&period; As we know that this is Spring Boot application&comma; so we don&&num;8217&semi;t need to configure Spring Data Solr manually for the Spring Boot application&period; The Spring Boot application will automatically configure the required configuration by default according to the library available on the classpath of the application&period; But we have to provide Apache Solr server address by configuring it with the application&period;properties file as the following&colon;<&sol;p>&NewLine;<h3>Application configuration file<&sol;h3>&NewLine;<p>First&comma; let&&num;8217&semi;s see the configuration file for the Spring Boot application&period;<br &sol;>&NewLine;<strong>application&period;properties<&sol;strong><&sol;p>&NewLine;<pre class&equals;"highlight">spring&period;data&period;solr&period;host&equals;http&colon;&sol;&sol;localhost&colon;8983&sol;solr&sol; &NewLine;<&sol;pre>&NewLine;<p>Let&&num;8217&semi;s assume&comma; if you don&&num;8217&semi;t want to use default configuration of the Spring Boot application or you are not using the Spring Boot for this application then you have to explicitly configure the Spring Data Solr into this Spring Data Solr CRUD Application&period;<&sol;p>&NewLine;<h3>Explicitly Java Based Configuration<&sol;h3>&NewLine;<p>Let&&num;8217&semi;s see the following Java-based configuration for the Spring Data Solr in the Spring Data Solr CRUD Application&period;<&sol;p>&NewLine;<pre class&equals;"highlight">&sol;&ast;&ast; &NewLine; &ast; &NewLine; &ast;&sol; &NewLine;package com&period;doj&period;app&period;config&semi; &NewLine; &NewLine;import org&period;apache&period;solr&period;client&period;solrj&period;SolrClient&semi; &NewLine;import org&period;apache&period;solr&period;client&period;solrj&period;impl&period;HttpSolrClient&semi; &NewLine;import org&period;springframework&period;beans&period;factory&period;annotation&period;Value&semi; &NewLine;import org&period;springframework&period;context&period;annotation&period;Bean&semi; &NewLine;import org&period;springframework&period;context&period;annotation&period;ComponentScan&semi; &NewLine;import org&period;springframework&period;context&period;annotation&period;Configuration&semi; &NewLine;import org&period;springframework&period;data&period;solr&period;core&period;SolrTemplate&semi; &NewLine;import org&period;springframework&period;data&period;solr&period;repository&period;config&period;EnableSolrRepositories&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh&period;Rajput &NewLine; &ast; &NewLine; &ast;&sol; &NewLine;&commat;Configuration &NewLine;&commat;EnableSolrRepositories&lpar; &NewLine;&Tab;&Tab;basePackages &equals; "com&period;doj&period;app&period;repository"&rpar; &NewLine;&commat;ComponentScan &NewLine;public class SolrConfig &lbrace; &NewLine;&Tab; &NewLine; &commat;Value&lpar;"spring&period;data&period;solr&period;host"&rpar; String solrURL&semi; &NewLine;&Tab; &NewLine; &commat;Bean &NewLine; public SolrClient solrClient&lpar;&rpar; &lbrace; &NewLine; return new HttpSolrClient&period;Builder&lpar;solrURL&rpar;&period;build&lpar;&rpar;&semi; &NewLine; &rcub; &NewLine; &NewLine; &commat;Bean &NewLine; public SolrTemplate solrTemplate&lpar;SolrClient client&rpar; throws Exception &lbrace; &NewLine; return new SolrTemplate&lpar;client&rpar;&semi; &NewLine; &rcub; &NewLine;&rcub; &NewLine; &NewLine;<&sol;pre>&NewLine;<p>We are using <em>&commat;EnableSolrRepositories<&sol;em> to scan the packages for repositories&period;<&sol;p>&NewLine;<blockquote><p><strong>Note<&sol;strong>&colon; If multi-core is not enabled&comma; then by default Spring Data will assume that Solr configuration is for a single core&period;<&sol;p><&sol;blockquote>&NewLine;<p>Now&comma; move to perform CRUD operation for this Solr collection in the Spring Data Solr CRUD Application&period;<&sol;p>&NewLine;<h2>Indexing&comma; Updating&comma; Deleting&comma; and Querying<&sol;h2>&NewLine;<p>In order to search documents in Solr&comma; documents should be indexed to Solr repository&period; Let&&num;8217&semi;s create a controller class which takes request parameters and index to the Solr document Order&period;<&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;doj&period;app&period;controller&semi; &NewLine; &NewLine;import java&period;util&period;List&semi; &NewLine; &NewLine;import org&period;springframework&period;beans&period;factory&period;annotation&period;Autowired&semi; &NewLine;import org&period;springframework&period;data&period;domain&period;PageRequest&semi; &NewLine;import org&period;springframework&period;web&period;bind&period;annotation&period;DeleteMapping&semi; &NewLine;import org&period;springframework&period;web&period;bind&period;annotation&period;GetMapping&semi; &NewLine;import org&period;springframework&period;web&period;bind&period;annotation&period;PathVariable&semi; &NewLine;import org&period;springframework&period;web&period;bind&period;annotation&period;PostMapping&semi; &NewLine;import org&period;springframework&period;web&period;bind&period;annotation&period;PutMapping&semi; &NewLine;import org&period;springframework&period;web&period;bind&period;annotation&period;RequestBody&semi; &NewLine;import org&period;springframework&period;web&period;bind&period;annotation&period;RestController&semi; &NewLine; &NewLine;import com&period;doj&period;app&period;pojo&period;Order&semi; &NewLine;import com&period;doj&period;app&period;repository&period;SolrOrderRepository&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine;&ast; &commat;author Dinesh&period;Rajput &NewLine;&ast; &NewLine;&ast;&sol; &NewLine;&commat;RestController &NewLine;public class OrderController &lbrace; &NewLine; &NewLine;&commat;Autowired &NewLine;SolrOrderRepository solrOrderRepository&semi; &NewLine; &NewLine;&commat;PostMapping&lpar;"&sol;order"&rpar; &NewLine;public String createOrder&lpar;&commat;RequestBody Order order&rpar;&lbrace; &NewLine;String description &equals; "Order Created"&semi; &NewLine;solrOrderRepository&period;save&lpar;order&rpar;&semi; &NewLine;return description&semi; &NewLine;&rcub; &NewLine; &NewLine;&commat;GetMapping&lpar;"&sol;order&sol;&lbrace;orderid&rcub;"&rpar; &NewLine;public Order readOrder&lpar;&commat;PathVariable Long orderid&rpar;&lbrace; &NewLine;return solrOrderRepository&period;findByOrderid&lpar;orderid&rpar;&semi; &NewLine;&rcub; &NewLine; &NewLine;&commat;PutMapping&lpar;"&sol;order"&rpar; &NewLine;public String updateOrder&lpar;&commat;RequestBody Order order&rpar;&lbrace; &NewLine;String description &equals; "Order Updated"&semi; &NewLine;solrOrderRepository&period;save&lpar;order&rpar;&semi; &NewLine;return description&semi; &NewLine;&rcub; &NewLine; &NewLine;&commat;DeleteMapping&lpar;"&sol;order&sol;&lbrace;orderid&rcub;"&rpar; &NewLine;public String deleteOrder&lpar;&commat;PathVariable Long orderid&rpar;&lbrace; &NewLine;String description &equals; "Order Deleted"&semi; &NewLine;solrOrderRepository&period;delete&lpar;solrOrderRepository&period;findByOrderid&lpar;orderid&rpar;&rpar;&semi; &NewLine;return description&semi; &NewLine;&rcub; &NewLine; &NewLine;&commat;GetMapping&lpar;"&sol;order&sol;desc&sol;&lbrace;orderDesc&rcub;&sol;&lbrace;page&rcub;"&rpar; &NewLine;public List&lt&semi;Order&gt&semi; findOrder&lpar;&commat;PathVariable String orderDesc&comma; &commat;PathVariable int page&rpar;&lbrace; &NewLine;return solrOrderRepository&period;findByOrderDescription&lpar;orderDesc&comma; PageRequest&period;of&lpar;page&comma; 2&rpar;&rpar;&period;getContent&lpar;&rpar;&semi; &NewLine;&rcub; &NewLine; &NewLine;&commat;GetMapping&lpar;"&sol;order&sol;search&sol;&lbrace;searchTerm&rcub;&sol;&lbrace;page&rcub;"&rpar; &NewLine;public List&lt&semi;Order&gt&semi; findOrderBySearchTerm&lpar;&commat;PathVariable String searchTerm&comma; &commat;PathVariable int page&rpar;&lbrace; &NewLine;return solrOrderRepository&period;findByCustomerQuery&lpar;searchTerm&comma; PageRequest&period;of&lpar;page&comma; 2&rpar;&rpar;&period;getContent&lpar;&rpar;&semi; &NewLine;&rcub; &NewLine;&rcub; &NewLine;<&sol;pre>&NewLine;<p><strong>Create<&sol;strong><&sol;p>&NewLine;<p>In the above controller class&comma; we have created all CRUD operation and provided handler methods for these operations&period; Let&&num;8217&semi;s run this application and index some data by using <em>createOrder&lpar;&rpar;<&sol;em> request handler method with <em><strong>&sol;order POST<&sol;strong><&sol;em> endpoint&period;<&sol;p>&NewLine;<p><strong>Read<&sol;strong><&sol;p>&NewLine;<p>In the above controller class&comma; we have created <em>readOrder&lpar;&rpar;<&sol;em> request handler method with <strong><em>&sol;order&sol;&lbrace;orderid&rcub;<&sol;em> <em>GET<&sol;em><&sol;strong> endpoint to read the data from the Solr server using the Spring Data Solr&period;<&sol;p>&NewLine;<p><strong>Update<&sol;strong><&sol;p>&NewLine;<p>In the above controller class&comma; we have created <em>updateOrder&lpar;&rpar;<&sol;em> request handler method with<em><strong> &sol;order PUT<&sol;strong><&sol;em> endpoint to update a given order value&period;<&sol;p>&NewLine;<p><strong>Delete<&sol;strong><&sol;p>&NewLine;<p>In the above controller class&comma; we have created <em>deleteOrder&lpar;&rpar;<&sol;em> request handler method with <em><strong>&sol;order&sol;&lbrace;orderid&rcub; DELETE<&sol;strong><&sol;em> endpoint to delete a document from the Solr collection&period;<&sol;p>&NewLine;<p>Let&&num;8217&semi;s see the following the Solr dashboard after creating data into Order collection&period;<&sol;p>&NewLine;<p><img class&equals;"aligncenter size-full wp-image-4221" src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2018&sol;09&sol;solr-data&period;png" alt&equals;"solr data" width&equals;"779" height&equals;"626" &sol;><&sol;p>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<h2>Summary<&sol;h2>&NewLine;<p>This article has all about the Spring Data Solr with Spring Boot and the Apache Solr&period; It is a quick and practical introduction to Spring Data Solr&comma; covering the basic configuration&comma; defining repositories and perform CRUD operation&period; In this Spring Data Solr CRUD Application&comma; we have created an application and this application available as a sample project on <strong><a href&equals;"https&colon;&sol;&sol;github&period;com&sol;dineshonjava&sol;SpringBootSpringDataSolrCrudExample" rel&equals;"noopener">Github<&sol;a><&sol;strong>&period;<&sol;p>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<div class&equals;"wp-post-navigation"> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <div class&equals;"wp-post-navigation-pre"> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-data-solr-pagination-example&sol;">Previous<&sol;a> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <&sol;div> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <div class&equals;"wp-post-navigation-next"> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <&sol;div> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;<&sol;div>&NewLine;<script type&equals;"text&sol;javascript">&NewLine;jQuery&lpar;document&rpar;&period;ready&lpar;function&lpar;&dollar;&rpar; &lbrace;&NewLine; &dollar;&period;post&lpar;'https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-admin&sol;admin-ajax&period;php'&comma; &lbrace;action&colon; 'mts&lowbar;view&lowbar;count'&comma; id&colon; '4219'&rcub;&rpar;&semi;&NewLine;&rcub;&rpar;&semi;&NewLine;<&sol;script>

Dinesh Rajput

Dinesh Rajput is the chief editor of a website Dineshonjava, a technical blog dedicated to the Spring and Java technologies. It has a series of articles related to Java technologies. Dinesh has been a Spring enthusiast since 2008 and is a Pivotal Certified Spring Professional, an author of a book Spring 5 Design Pattern, and a blogger. He has more than 10 years of experience with different aspects of Spring and Java design and development. His core expertise lies in the latest version of Spring Framework, Spring Boot, Spring Security, creating REST APIs, Microservice Architecture, Reactive Pattern, Spring AOP, Design Patterns, Struts, Hibernate, Web Services, Spring Batch, Cassandra, MongoDB, and Web Application Design and Architecture. He is currently working as a technology manager at a leading product and web development company. He worked as a developer and tech lead at the Bennett, Coleman & Co. Ltd and was the first developer in his previous company, Paytm. Dinesh is passionate about the latest Java technologies and loves to write technical blogs related to it. He is a very active member of the Java and Spring community on different forums. When it comes to the Spring Framework and Java, Dinesh tops the list!

Share
Published by
Dinesh Rajput

Recent Posts

Strategy Design Patterns using Lambda

Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…

4 years ago

Decorator Pattern using Lambda

Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…

4 years ago

Delegating pattern using lambda

Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…

4 years ago

Spring Vs Django- Know The Difference Between The Two

Technology has emerged a lot in the last decade, and now we have artificial intelligence;…

4 years ago

TOP 20 MongoDB INTERVIEW QUESTIONS 2022

Managing a database is becoming increasingly complex now due to the vast amount of data…

4 years ago

Scheduler @Scheduled Annotation Spring Boot

Overview In this article, we will explore Spring Scheduler how we could use it by…

4 years ago