Spring Core

Spring Data MongoDB : Delete document

<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">&NewLine;<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">&NewLine;<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">&NewLine;<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">&NewLine;<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">&NewLine;<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">&NewLine;<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">&NewLine;<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">&NewLine;<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">In this tutorial we will discuss about the deleting the document from mongoDB&period; Document is same as a row in the table of relational database&period; In the our example we will fire deleting a document from &&num;8220&semi;dojCollection&&num;8221&semi; of &&num;8220&semi;dineshonjavaDB&&num;8221&semi;&period;<&sol;p>&NewLine;<h2><b>Methods for removing documents-<&sol;b><&sol;h2>&NewLine;<p>You can use several overloaded methods to remove an object from the database&period;<&sol;p>&NewLine;<div class&equals;"itemizedlist">&NewLine;<ul >&NewLine;<li><b>remove<&sol;b> Remove the given document based on one of the following&colon; a specific object instance&comma; a query document criteria combined with a class or a query document criteria combined with a specific collection name&period;<&sol;li>&NewLine;<&sol;ul>&NewLine;<&sol;div>&NewLine;<p>To see the more about the deleting plesse click on <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;java-mongodb-deleting-document-to&sol;" target&equals;"&lowbar;blank" rel&equals;"noopener"><b>MongoDB Deleting a Document to Database<&sol;b><&sol;a><&sol;p>&NewLine;<p>In Spring data for MongoDB&comma; you can use <b>remove&lpar;&rpar;<&sol;b> and <b>findAndRemove&lpar;&rpar;<&sol;b> to delete document from mongoDB&period;<&sol;p>&NewLine;<&sol;div>&NewLine;<pre class&equals;"highlight">Employee employee &equals; new Employee&lpar;&rpar;&semi; &NewLine; &NewLine; &sol;&sol;delete employee object&comma; under entity collection &lpar;"dojCollection"&rpar; &NewLine; mongoOperation&period;remove&lpar;employee&rpar;&semi; &NewLine; &NewLine; &sol;&sol;delete where empId &equals; 10002&comma; under "dojCollection" collection &NewLine; mongoOperation&period;remove&lpar;new Query&lpar;Criteria&period;where&lpar;"empId"&rpar;&period;is&lpar;10002&rpar;&rpar;&comma;"dojCollection"&rpar;&semi; &NewLine; &NewLine; &sol;&sol;delete where empId &equals; 10003&comma; under "dojCollection" collection &NewLine; &sol;&sol;and return the deleted employee object &NewLine; Employee deletedEmployee &equals; &NewLine;mongoOperation&period;findAndRemove&lpar;new Query&lpar;Criteria&period;where&lpar;"empId"&rpar;&period;is&lpar;10003&rpar;&rpar;&comma; Employee&period;class&comma;"dojCollection"&rpar;&semi; &NewLine;<&sol;pre>&NewLine;<p><b><br &sol;>&NewLine;<&sol;b> <b>Note&colon;<&sol;b><br &sol;>&NewLine;1&period; The findAndRemove&lpar;&rpar; method will delete the matched record and return the deleted records&period;<br &sol;>&NewLine;2&period; Be careful about the remove&lpar;&rpar; method&comma; if Query parameter failed to match any of the records&comma; it will caused null pointer exception&period;<&sol;p>&NewLine;<p>See the full example to query a document from the &&num;8220&semi;<b>dojCollection<&sol;b>&&num;8221&semi; of the &&num;8220&semi;<b>dineshonjavaDB<&sol;b>&&num;8221&semi;<&sol;p>&NewLine;<div class&equals;"separator" style&equals;"clear&colon; both&semi; text-align&colon; center&semi;"><img src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2013&sol;02&sol;springdelete&period;png" border&equals;"0" &sol;><&sol;div>&NewLine;<h3><b>Step 1&colon; Creating the domain class Employee<&sol;b><br &sol;>&NewLine;<b>Employee&period;java  <&sol;b><&sol;h3>&NewLine;<&sol;div>&NewLine;<pre class&equals;"highlight">package com&period;dineshonjava&period;mongo&period;dto&semi; &NewLine; &NewLine;import org&period;springframework&period;data&period;annotation&period;Id&semi; &NewLine;import org&period;springframework&period;data&period;mongodb&period;core&period;mapping&period;Document&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh Rajput &NewLine; &ast; &NewLine; &ast;&sol; &NewLine;&commat;Document &NewLine;public class Employee &lbrace; &NewLine; &commat;Id &NewLine; private int empId&semi; &NewLine; private String empName&semi; &NewLine; private long salary&semi; &NewLine; private int empAge&semi; &NewLine; public int getEmpId&lpar;&rpar; &lbrace; &NewLine; return empId&semi; &NewLine; &rcub; &NewLine; public void setEmpId&lpar;int empId&rpar; &lbrace; &NewLine; this&period;empId &equals; empId&semi; &NewLine; &rcub; &NewLine; public String getEmpName&lpar;&rpar; &lbrace; &NewLine; return empName&semi; &NewLine; &rcub; &NewLine; public void setEmpName&lpar;String empName&rpar; &lbrace; &NewLine; this&period;empName &equals; empName&semi; &NewLine; &rcub; &NewLine; public long getSalary&lpar;&rpar; &lbrace; &NewLine; return salary&semi; &NewLine; &rcub; &NewLine; public void setSalary&lpar;long salary&rpar; &lbrace; &NewLine; this&period;salary &equals; salary&semi; &NewLine; &rcub; &NewLine; public int getEmpAge&lpar;&rpar; &lbrace; &NewLine; return empAge&semi; &NewLine; &rcub; &NewLine; public void setEmpAge&lpar;int empAge&rpar; &lbrace; &NewLine; this&period;empAge &equals; empAge&semi; &NewLine; &rcub; &NewLine; &commat;Override &NewLine; public String toString&lpar;&rpar; &lbrace; &NewLine; return "Employee &lbrack;age&equals;" &plus; empAge &plus; "&comma; empName&equals;" &plus; empName &plus; "&comma; empId&equals;" &NewLine; &plus; empId &plus; "&comma; salary&equals;" &plus; salary &plus; "&rsqb;"&semi; &NewLine; &rcub; &NewLine;&rcub; &NewLine;<&sol;pre>&NewLine;<h3><b>Step 2&colon; Creating configuration file<br &sol;>&NewLine;mongo-config&period;xml<&sol;b><&sol;h3>&NewLine;<&sol;div>&NewLine;<pre class&equals;"highlight">&lt&semi;beans xmlns&colon;context&equals;"http&colon;&sol;&sol;www&period;springframework&period;org&sol;schema&sol;context" xmlns&colon;mongo&equals;"http&colon;&sol;&sol;www&period;springframework&period;org&sol;schema&sol;data&sol;mongo" xmlns&colon;p&equals;"http&colon;&sol;&sol;www&period;springframework&period;org&sol;schema&sol;p" xmlns&colon;xsi&equals;"http&colon;&sol;&sol;www&period;w3&period;org&sol;2001&sol;XMLSchema-instance" xmlns&equals;"http&colon;&sol;&sol;www&period;springframework&period;org&sol;schema&sol;beans" xsi&colon;schemalocation&equals;"http&colon;&sol;&sol;www&period;springframework&period;org&sol;schema&sol;beans &NewLine; http&colon;&sol;&sol;www&period;springframework&period;org&sol;schema&sol;beans&sol;spring-beans-3&period;0&period;xsd &NewLine; http&colon;&sol;&sol;www&period;springframework&period;org&sol;schema&sol;data&sol;mongo &NewLine; http&colon;&sol;&sol;www&period;springframework&period;org&sol;schema&sol;data&sol;mongo&sol;spring-mongo-1&period;0&period;xsd"&gt&semi; &NewLine; &NewLine; &lt&semi;&excl;-- Default bean name is 'mongo' --&gt&semi; &NewLine; &lt&semi;mongo&colon;mongo host&equals;"localhost" port&equals;"27017"&sol;&gt&semi; &NewLine; &lt&semi;&excl;-- Default bean name is 'mongo' --&gt&semi; &NewLine; &lt&semi;mongo&colon;mongo&gt&semi; &NewLine; &lt&semi;mongo&colon;options connections-per-host&equals;"100" &NewLine; threads-allowed-to-block-for-connection-multiplier&equals;"5" &NewLine; max-wait-time&equals;"120000000" &NewLine; connect-timeout&equals;"10000000" &NewLine; socket-keep-alive&equals;"true" &NewLine; socket-timeout&equals;"15000000" &NewLine; auto-connect-retry&equals;"true"&sol;&gt&semi; &NewLine; &lt&semi;&sol;mongo&colon;mongo&gt&semi; &NewLine; &NewLine; &lt&semi;context&colon;annotation-config&sol;&gt&semi; &NewLine; &NewLine; &lt&semi;context&colon;component-scan base-package&equals;"com&period;dineshonjava&period;mongo"&gt&semi; &NewLine; &lt&semi;context&colon;exclude-filter type&equals;"annotation" expression&equals;"org&period;springframework&period;context&period;annotation&period;Configuration"&sol;&gt&semi; &NewLine; &lt&semi;&sol;context&colon;component-scan&gt&semi; &NewLine; &NewLine; &lt&semi;&excl;-- Offers convenience methods and automatic mapping between MongoDB JSON documents and your domain classes&period; --&gt&semi; &NewLine; &lt&semi;bean class&equals;"org&period;springframework&period;data&period;mongodb&period;core&period;MongoTemplate" id&equals;"mongoTemplate"&gt&semi; &NewLine; &lt&semi;constructor-arg ref&equals;"mongo"&sol;&gt&semi; &NewLine; &lt&semi;constructor-arg name&equals;"databaseName" value&equals;"dineshonjavaDB"&sol;&gt&semi; &NewLine; &lt&semi;&sol;bean&gt&semi; &NewLine; &NewLine;<&sol;pre>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<h3><b>Step 3&colon; Creating Class which inserting the document into the mongoDB&period;<&sol;b><br &sol;>&NewLine;<b>HelloMongoDB&period;java<&sol;b><&sol;h3>&NewLine;<pre class&equals;"highlight">package com&period;dineshonjava&period;mongo&period;main&semi; &NewLine; &NewLine;import static org&period;springframework&period;data&period;mongodb&period;core&period;query&period;Criteria&period;where&semi; &NewLine;import static org&period;springframework&period;data&period;mongodb&period;core&period;query&period;Query&period;query&semi; &NewLine; &NewLine;import java&period;util&period;ArrayList&semi; &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;mongodb&period;core&period;MongoOperations&semi; &NewLine;import org&period;springframework&period;data&period;mongodb&period;core&period;query&period;Update&semi; &NewLine;import org&period;springframework&period;stereotype&period;Repository&semi; &NewLine; &NewLine;import com&period;dineshonjava&period;mongo&period;dto&period;Employee&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh Rajput &NewLine; &ast; &NewLine; &ast;&sol; &NewLine;&commat;Repository &NewLine;public class HelloMongoDB &lbrace; &NewLine; &NewLine; &commat;Autowired &NewLine; MongoOperations mongoOperations&semi; &NewLine; &NewLine; public void execute&lpar;&rpar; &lbrace; &NewLine; if &lpar;mongoOperations&period;collectionExists&lpar;"dojCollection"&rpar;&rpar; &lbrace; &NewLine; mongoOperations&period;dropCollection&lpar;"dojCollection"&rpar;&semi; &NewLine; &rcub; &NewLine; Employee employee3 &equals; new Employee&lpar;&rpar;&semi; &NewLine; employee3&period;setEmpId&lpar;1001&rpar;&semi; &NewLine; employee3&period;setEmpName&lpar;"Dinesh Rajput"&rpar;&semi; &NewLine; employee3&period;setSalary&lpar;70000&rpar;&semi; &NewLine; employee3&period;setEmpAge&lpar;26&rpar;&semi; &NewLine; &NewLine; Employee employee4 &equals; new Employee&lpar;&rpar;&semi; &NewLine; employee4&period;setEmpId&lpar;1002&rpar;&semi; &NewLine; employee4&period;setEmpName&lpar;"Adesh Rajput"&rpar;&semi; &NewLine; employee4&period;setSalary&lpar;30000&rpar;&semi; &NewLine; employee4&period;setEmpAge&lpar;23&rpar;&semi; &NewLine; &NewLine; Employee employee5 &equals; new Employee&lpar;&rpar;&semi; &NewLine; employee5&period;setEmpId&lpar;1003&rpar;&semi; &NewLine; employee5&period;setEmpName&lpar;"Vinesh Rajput"&rpar;&semi; &NewLine; employee5&period;setSalary&lpar;32000&rpar;&semi; &NewLine; employee5&period;setEmpAge&lpar;23&rpar;&semi; &NewLine; &NewLine; Employee employee6 &equals; new Employee&lpar;&rpar;&semi; &NewLine; employee6&period;setEmpId&lpar;1004&rpar;&semi; &NewLine; employee6&period;setEmpName&lpar;"Sweety Rajput"&rpar;&semi; &NewLine; employee6&period;setSalary&lpar;50000&rpar;&semi; &NewLine; employee6&period;setEmpAge&lpar;22&rpar;&semi; &NewLine; &NewLine; List&lt&semi;Employee&gt&semi; empList &equals; new ArrayList&lt&semi;Employee&gt&semi;&lpar;&rpar;&semi; &NewLine; empList&period;add&lpar;employee3&rpar;&semi; &NewLine; empList&period;add&lpar;employee4&rpar;&semi; &NewLine; empList&period;add&lpar;employee5&rpar;&semi; &NewLine; empList&period;add&lpar;employee6&rpar;&semi; &NewLine; &NewLine; mongoOperations&period;insert&lpar;empList&comma; "dojCollection"&rpar;&semi; &NewLine; &NewLine; System&period;out&period;println&lpar;"&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;CASE 1&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;"&rpar;&semi; &NewLine; &sol;&sol; Case 1 &period;&period;&period;delete where empId &equals; 1001 &NewLine; &sol;&sol; delete &NewLine; mongoOperations&period;remove&lpar;query&lpar;where&lpar;"empId"&rpar;&period;is&lpar;1001&rpar;&rpar;&comma; "dojCollection"&rpar;&semi; &NewLine; System&period;out&period;println&lpar;"deleted"&rpar;&semi; &NewLine; System&period;out&period;println&lpar;"&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;CASE 2&ast;&ast;findAndRemove User&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;"&rpar;&semi; &NewLine; &sol;&sol; Case 2 &period;&period;&period; delete where empId &equals; 10002&comma; and returns the deleted record &NewLine; &sol;&sol; find &NewLine; Employee employee2 &equals; mongoOperations&period;findAndRemove&lpar;query&lpar;where&lpar;"empId"&rpar;&period;is&lpar;1002&rpar;&rpar;&comma; Employee&period;class&comma;"dojCollection"&rpar;&semi; &NewLine; System&period;out&period;println&lpar;employee2&rpar;&semi; &NewLine; &NewLine; &rcub; &NewLine;&rcub; &NewLine;<&sol;pre>&NewLine;<h3><b>Step 4&colon; Running the Example<&sol;b><&sol;h3>&NewLine;<p>Following code shows how to run this example<&sol;p>&NewLine;<p><b>HelloMongoTestApp&period;java<&sol;b><&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;dineshonjava&period;mongo&period;main&semi; &NewLine; &NewLine;import org&period;springframework&period;context&period;ConfigurableApplicationContext&semi; &NewLine;import org&period;springframework&period;context&period;support&period;ClassPathXmlApplicationContext&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh Rajput &NewLine; &ast; &NewLine; &ast;&sol; &NewLine;public class HelloMongoTestApp &lbrace; &NewLine; &NewLine; &sol;&ast;&ast; &NewLine; &ast; &commat;param args &NewLine; &ast;&sol; &NewLine; public static void main&lpar;String&lbrack;&rsqb; args&rpar; &lbrace; &NewLine; ConfigurableApplicationContext context &equals; new ClassPathXmlApplicationContext&lpar;"mongo-config&period;xml"&rpar;&semi; &NewLine; &NewLine; HelloMongoDB hello &equals; &lpar;HelloMongoDB&rpar; context&period;getBean&lpar;"helloMongoDB"&rpar;&semi; &NewLine; hello&period;execute&lpar;&rpar;&semi; &NewLine; System&period;out&period;println&lpar; "DONE&excl;" &rpar;&semi; &NewLine; &rcub; &NewLine; &NewLine;&rcub; &NewLine;<&sol;pre>&NewLine;<p>If everything is fine then run the above main application as Java Application we will get the following<&sol;p>&NewLine;<div style&equals;"background-color&colon; &num;ff99cc&semi;"><b>output&colon;<&sol;b><br &sol;>&NewLine;log4j&colon;WARN No appenders could be found for logger &lpar;org&period;springframework&period;context&period;support&period;ClassPathXmlApplicationContext&rpar;&period;<br &sol;>&NewLine;log4j&colon;WARN Please initialize the log4j system properly&period;<br &sol;>&NewLine;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;CASE 1&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;<br &sol;>&NewLine;deleted<br &sol;>&NewLine;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;CASE 2&ast;&ast;findAndRemove User&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;&ast;<br &sol;>&NewLine;Employee &lbrack;age&equals;23&comma; empName&equals;Adesh Rajput&comma; empId&equals;1002&comma; salary&equals;30000&rsqb;<br &sol;>&NewLine;DONE&excl;<&sol;div>&NewLine;<h2><b><br &sol;>&NewLine;<&sol;b> <b>Download SourceCode&plus;Libs<&sol;b><br &sol;>&NewLine;<a href&equals;"https&colon;&sol;&sol;sites&period;google&period;com&sol;site&sol;dinesh9582486434&sol;my-forms&sol;MongoDBSpringDeleteDemo&period;zip&quest;attredirects&equals;0&amp&semi;d&equals;1" target&equals;"&lowbar;blank" rel&equals;"noopener"><b>MongoDBSpringDeleteDemo&period;zip<&sol;b><&sol;a><&sol;h2>&NewLine;<p><b>References<&sol;b><br &sol;>&NewLine;<a href&equals;"http&colon;&sol;&sol;static&period;springsource&period;org&sol;spring-data&sol;data-document&sol;docs&sol;1&period;0&period;0&period;M2&sol;reference&sol;html&sol;&num;mongodb-template-query" target&equals;"&lowbar;blank" rel&equals;"noopener"><b>MongoDB template query documentation<&sol;b><&sol;a><&sol;p>&NewLine;<div style&equals;"background-color&colon; &num;ff99cc&semi;">                        <b>     &lt&semi;&lt&semi;<a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-data-mongodb-query-document&sol;">previous<&sol;a>&lt&semi;&lt&semi;             &vert;&vert; <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;introduction-to-mongodb&sol;">index  <&sol;a>&vert;&vert;         &gt&semi;&gt&semi;<a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-data-mongodb-delete-document&sol;">next<&sol;a>&gt&semi;&gt&semi;<&sol;b><&sol;div>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<&sol;div>&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-mongodb-query-document&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; <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-tutorial&sol;">Next<&sol;a> &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; '580'&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