<div dir="ltr" style="text-align: justify;">
<p>In this spring rest tutorial, we will create restful web services Crud APIs by using HTTP verbs GET, POST, PUT and Delete and returning XML representations of resources. In previous post, we have created a <a href="https://dineshonjava.com/spring-restful-web-services-json-crud-example/"><b>Spring Restful web services CRUD</b></a> based example which returns json. In this post, we will see same example Spring Restful web services CRUD based on which will return xml.</p>
<div id="ads-id" align="center"></div>
<p>If you want to learn more about REST you could read my previous article <b><a href="https://dineshonjava.com/what-is-rest-and-rest-architecture-and-rest-constraints/">What is REST? Architecture and it&#8217;s Constraints</a>. </b>And also I have discussed how to consume <b><a href="https://dineshonjava.com/spring-rest-client-resttemplate-consume-restful-web-service-example-json/">Spring RESTful web services by RestTemplate read this article</a>.</b></p>
<p><b>Technologies used in this example</b></p>
<ul style="text-align: left;">
<li>Spring webmvc</li>
<li>Spring Data JPA</li>
<li>JAXB</li>
<li>Hibernate Entity Manager</li>
<li>H2 in-memory database</li>
</ul>
<p>Let&#8217;s see steps to create a simple Spring Restful web services crud example which will return XML.</p>
<p><b>Step 1: Create a Dynamic web project using maven.</b></p>
<p><b>Project Structure</b></p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://3.bp.blogspot.com/-R3EYuZJR3UI/WNqbjOgZFLI/AAAAAAAAGI8/SSj8VCZT1C0q1PbsOUK2pdkhWeBnjt-HQCLcB/s1600/Spring-Rest-CRUD-XML-Example.bmp" border="0" /></div>
<p><b>Download Source Code from GitHub</b><br />
<a href="https://github.com/dineshonjava/SpringREST-CRUD-XML-Example" target="_blank" rel="noopener"><b>Spring Restful Web Services XML CRUD Example</b></a></p>
<div style="background-color: #f2f9fc; border:1px solid #c9e6f2;border-radius:3px;padding:16px;line-height:1.45;">
<span style="color: red;font-size: x-large;text-align: center;"><b>Popular Tutorials</b></span></p>
<ul style="text-align: left;">
<li><b><a href="https://dineshonjava.com/spring-tutorial/"><em><strong>Spring Tutorial</strong> </em></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-web-mvc-framework-chapter-38/"><strong><em>Spring MVC Web Tutorial </em></strong></a></b></li>
<li><b><a href="https://dineshonjava.com/introduction-to-spring-boot-a-spring-boot-complete-guide/"><strong>Spring Boot Tutorial</strong> </a></b></li>
<li><b><a href="https://dineshonjava.com/spring-security-take-baby-step-to-secure/"><em>Spring Security Tutorial</em></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-aop-tutorial-with-example-aspect-advice-pointcut-joinpoint/"><em>Spring AOP Tutorial</em></a></b></li>
<li><b><a href="https://dineshonjava.com/using-spring-jdbc-framework-chapter-32/"><em>Spring JDBC Tutorial</em></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-hateoas-hypermedia-driven-restful-web-service/"><em><strong>Spring HATEOAS </strong></em></a></b></li>
<li><b><a href="https://dineshonjava.com/microservices-with-spring-boot/"><em><strong>Microservices with Spring Boot</strong></em></a></b></li>
<li><b><a href="https://dineshonjava.com/jax-rs-web-service-tutorial/"><strong><em>REST Webservice</em> </strong></a></b></li>
<li><b><a href="https://dineshonjava.com/core-java-baby-step-to-be-best-java-ian/"><em><strong>Core Java </strong></em></a></b></li>
<li><b><a href="https://dineshonjava.com/hibernate-3-on-baby-steps/"><em><strong>Hibernate Tutorial</strong></em></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-batch-process-with-example/"><strong><em>Spring Batch</em> </strong></a></b></li>
</ul>
</div>
<p><b>Step 2: Maven dependency for this application.</b><br />
In <b>pom.xml</b>, there are following dependency required for this application.</p>
<pre class="highlight"><;properties>; 
 <;spring.version>;4.3.5.RELEASE<;/spring.version>; 
 <;spring.data.version>;1.11.1.RELEASE<;/spring.data.version>; 
 <;h2.version>;1.4.193<;/h2.version>; 
 <;/properties>; 
 
 <;dependencies>; 
 <;dependency>; 
 <;groupId>;org.springframework<;/groupId>; 
 <;artifactId>;spring-webmvc<;/artifactId>; 
 <;version>;${spring.version}<;/version>; 
 <;/dependency>; 
 
 <;dependency>; 
 <;groupId>;org.springframework.data<;/groupId>; 
 <;artifactId>;spring-data-jpa<;/artifactId>; 
 <;version>;${spring.data.version}<;/version>; 
 <;/dependency>; 
 
 <;dependency>; 
 <;groupId>;com.h2database<;/groupId>; 
 <;artifactId>;h2<;/artifactId>; 
 <;version>;${h2.version}<;/version>; 
 <;/dependency>; 
 
 <;dependency>; 
 <;groupId>;org.hibernate<;/groupId>; 
 <;artifactId>;hibernate-entitymanager<;/artifactId>; 
 <;version>;5.1.0.Final<;/version>; 
 <;/dependency>; 
 <;/dependencies>; 
</pre>
<p>If you want to include JSON response support as well then you need to do is include Jackson libraries into classpath, same APIs will work for jackson as well.</p>
<pre class="highlight"><;dependency>; 
 <;groupId>;com.fasterxml.jackson.core<;/groupId>; 
 <;artifactId>;jackson-databind<;/artifactId>; 
 <;version>;2.5.0<;/version>; 
<;/dependency>; 
</pre>
<p><b>Step 3: Creating Spring Configuration files for this application</b><br />
Here we are using Java based configuration. So let&#8217;s see following configuration java classes for this example.</p>
<p><b>a) Spring Configuration class for Spring MVC </b></p>
<p><b>RestApplicationConfig.java</b></p>
<pre class="highlight">/** 
 * 
 */ 
package com.doj.restapi.web.config; 
 
import org.springframework.context.annotation.ComponentScan; 
import org.springframework.context.annotation.Configuration; 
import org.springframework.web.servlet.config.annotation.EnableWebMvc; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
@Configuration 
@EnableWebMvc 
@ComponentScan("com.doj.restapi.web.controller") 
public class RestApplicationConfig{ 
 
} 
</pre>
<p><b>b) Spring Configuration for application Infrastructure</b></p>
<p>This file has configuration about application core services like DB connection, DataSource and also scan the packages for service classes and repositories i.e. Non web components.</p>
<p><b>InfrastructureConfig.java</b></p>
<pre class="highlight">/** 
 * 
 */ 
package com.doj.restapi.config; 
 
import javax.persistence.EntityManagerFactory; 
import javax.sql.DataSource; 
 
import org.springframework.context.annotation.Bean; 
import org.springframework.context.annotation.ComponentScan; 
import org.springframework.context.annotation.Configuration; 
import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; 
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; 
import org.springframework.orm.jpa.JpaTransactionManager; 
import org.springframework.orm.jpa.JpaVendorAdapter; 
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; 
import org.springframework.orm.jpa.vendor.Database; 
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
@Configuration 
@ComponentScan("com.doj.restapi.service") 
@EnableJpaRepositories("com.doj.restapi.repository") 
public class InfrastructureConfig { 
 
 @Bean 
 public DataSource dataSource() { 
 return new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.H2).build(); 
 } 
 
 @Bean 
 public JpaVendorAdapter jpaVendorAdapter() { 
 HibernateJpaVendorAdapter bean = new HibernateJpaVendorAdapter(); 
 bean.setDatabase(Database.H2); 
 bean.setGenerateDdl(true); 
 return bean; 
 } 
 
 @Bean 
 public LocalContainerEntityManagerFactoryBean entityManagerFactory( 
 DataSource dataSource, JpaVendorAdapter jpaVendorAdapter) { 
 LocalContainerEntityManagerFactoryBean bean = new LocalContainerEntityManagerFactoryBean(); 
 bean.setDataSource(dataSource); 
 bean.setJpaVendorAdapter(jpaVendorAdapter); 
 bean.setPackagesToScan("com.doj.restapi.bean"); 
 return bean; 
 } 
 
 @Bean 
 public JpaTransactionManager transactionManager(EntityManagerFactory emf) { 
 return new JpaTransactionManager(emf); 
 } 
} 
</pre>
<p><b>Step 4: Creating Web Application Initializer file for this application</b><br />
In this example we are using Java Based web application configuration instead of traditional web.xml file and for this we have required at least tomcat 7 and servlet 3.0+ .</p>
<p><b>RestApplicationInitializer.java</b></p>
<pre class="highlight">/** 
 * 
 */ 
package com.doj.restapi.web; 
 
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; 
 
import com.doj.restapi.config.InfrastructureConfig; 
import com.doj.restapi.web.config.RestApplicationConfig; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
public class RestApplicationInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { 
 
 @Override 
 protected Class<;?>;[] getRootConfigClasses() { 
 return new Class[] { InfrastructureConfig.class }; 
 } 
 
 @Override 
 protected Class<;?>;[] getServletConfigClasses() { 
 return new Class[] { RestApplicationConfig.class }; 
 } 
 
 @Override 
 protected String[] getServletMappings() { 
 return new String[] { "/" }; 
 } 
} 
 
</pre>
<p><b>Step 5: Creating Application classes</b><br />
In this application, we will create and read account resource from account repository.<br />
<b>a) Create a Controller <i>AccountController.java</i></b></p>
<pre class="highlight">/** 
 * 
 */ 
package com.doj.restapi.web.controller; 
 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.web.bind.annotation.DeleteMapping; 
import org.springframework.web.bind.annotation.GetMapping; 
import org.springframework.web.bind.annotation.PathVariable; 
import org.springframework.web.bind.annotation.PostMapping; 
import org.springframework.web.bind.annotation.PutMapping; 
import org.springframework.web.bind.annotation.RequestBody; 
import org.springframework.web.bind.annotation.RestController; 
 
import com.doj.restapi.bean.Account; 
import com.doj.restapi.bean.AccountList; 
import com.doj.restapi.service.IAccountService; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
@RestController 
public class AccountController { 
 
 @Autowired 
 IAccountService accountService; 
 
 @GetMapping("/") 
 public String home (){ 
 return "Spring REST Dinesh on Java!!!"; 
 } 
 
 @GetMapping("/accounts") 
 public AccountList all (){ 
 return accountService.list(); 
 } 
 
 @PostMapping("/account") 
 public Account create (@RequestBody Account account){ 
 return accountService.create(account); 
 } 
 
 @GetMapping("/account/{accountId}") 
 public Account get (@PathVariable Long accountId){ 
 return accountService.get(accountId); 
 } 
 
 @PutMapping("/account") 
 public Account update (@RequestBody Account account){ 
 return accountService.update(account); 
 } 
 
 @DeleteMapping("/account/{accountId}") 
 public void delete (@PathVariable Long accountId){ 
 accountService.delete(accountId); 
 } 
} 
 
</pre>
<p>In this controller class we have used <b><i>@RestController</i></b> annotation. Till Spring 3, we would have been using <b><i>@Controller </i></b>annotation and in that case it was important to use <b><i>@ResponseBody</i></b> annotation as well as below:</p>
<pre class="highlight">@Controller 
public class AccountController { 
..... 
..... 
 
@RequestMapping("/account/{accountId}") 
public @ResponseBody Account get (@PathVariable Long accountId){ 
 return accountService.get(accountId); 
} 
..... 
..... 
} 
</pre>
<p>As of spring 4.0, we can use @RestController which is combination of @Controller and @ResponseBody. Read my article <b><a href="https://dineshonjava.com/restcontroller-in-spring-40-framework/">RestController in Spring Framework 4.0</a> </b>for more detail.</p>
<pre class="highlight">@RestController = @Controller + @ResponseBody 
</pre>
<p>In this example, we are using <b style="font-style: italic;">@GetMapping, @PostMapping, @PutMapping </b>and <b style="font-style: italic;">@DeleteMapping </b>annotations, these annotations are introduced from Spring 4.3 version in parallel of @RequestMapping with Http Methods annotation as below.</p>
<pre class="highlight">@GetMapping = @RequestMapping + Http GET method 
@PostMapping = @RequestMapping + Http POST method 
@PutMapping = @RequestMapping + Http PUT method 
@DeleteMapping = @RequestMapping + Http DELETE method 
</pre>
<p>Spring provides <b><i>HttpMessageConverters </i></b>to convert an object to the xml representation requested by the user. Spring&#8217;s @ResponseBody annotation is responsible for generating body response by using result of the method to the client. In this example we want XML response so this marshaling is done by the <b><i>Jaxb2RootElementHttpMessageConverter</i></b> provided by Spring which is automatically registered in spring context if JAXB libraries are found in classpath. <a href="https://dineshonjava.com/jaxb-2x-tutorial/">JAXB </a>library is inbuilt in the java from JDK 7.0 here I am using JDK 8 in this application, so there is no need to configure JAXB library into Maven dependency file.</p>
<p><b>b) JAXB Annotated Model Objects</b><br />
We need to annotate bean class with <b><i>@XmlRootElement</i></b> and <b><i>@XmlElement</i></b> to support for xml.</p>
<p><b>Account.java</b></p>
<pre class="highlight">/** 
 * 
 */ 
package com.doj.restapi.bean; 
 
import java.io.Serializable; 
 
import javax.persistence.Entity; 
import javax.persistence.GeneratedValue; 
import javax.persistence.Id; 
import javax.persistence.Table; 
import javax.xml.bind.annotation.XmlAccessType; 
import javax.xml.bind.annotation.XmlAccessorType; 
import javax.xml.bind.annotation.XmlAttribute; 
import javax.xml.bind.annotation.XmlElement; 
import javax.xml.bind.annotation.XmlRootElement; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
@XmlRootElement 
@XmlAccessorType(XmlAccessType.NONE) 
@Entity 
@Table 
public class Account implements Serializable{ 
 
 /** 
 * 
 */ 
 private static final long serialVersionUID = 1L; 
 
 @XmlAttribute 
 @Id 
 @GeneratedValue 
 public Long accountId; 
 
 @XmlElement 
 public String name; 
 
 @XmlElement 
 public String city; 
 
 @XmlElement 
 public Double balance; 
 
 public Account() { 
 super(); 
 } 
 public Account(String name, String city, Double balance) { 
 super(); 
 this.name = name; 
 this.city = city; 
 this.balance = balance; 
 } 
 public Long getAccountId() { 
 return accountId; 
 } 
 public void setAccountId(Long accountId) { 
 this.accountId = accountId; 
 } 
 public String getName() { 
 return name; 
 } 
 public void setName(String name) { 
 this.name = name; 
 } 
 public String getCity() { 
 return city; 
 } 
 public void setCity(String city) { 
 this.city = city; 
 } 
 public Double getBalance() { 
 return balance; 
 } 
 public void setBalance(Double balance) { 
 this.balance = balance; 
 } 
 @Override 
 public String toString() { 
 return "Account [accountId=" + accountId + ", name=" + name + ", city=" + city + ", balance=" + balance + "]"; 
 } 
 
} 
 
</pre>
<p><b>AccountList.java</b></p>
<pre class="highlight">/** 
 * 
 */ 
package com.doj.restapi.bean; 
 
import java.io.Serializable; 
import java.util.List; 
 
import javax.xml.bind.annotation.XmlElement; 
import javax.xml.bind.annotation.XmlRootElement; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
@XmlRootElement (name="accounts") 
public class AccountList implements Serializable { 
 
 /** 
 * 
 */ 
 private static final long serialVersionUID = 1L; 
 
 private List<;Account>; listOfAccounts; 
 
 public List<;Account>; getListOfAccounts() { 
 return listOfAccounts; 
 } 
 @XmlElement(name = "account") 
 public void setListOfAccounts(List<;Account>; listOfAccounts) { 
 this.listOfAccounts = listOfAccounts; 
 } 
 
} 
 
</pre>
<p><b>c) Create a Service class <i>AccountService.java</i></b><br />
This class has CRUD method service for account resource.</p>
<p><b>AccountService.java</b></p>
<pre class="highlight">/** 
 * 
 */ 
package com.doj.restapi.service; 
 
import java.util.ArrayList; 
import java.util.List; 
 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.stereotype.Service; 
 
import com.doj.restapi.bean.Account; 
import com.doj.restapi.bean.AccountList; 
import com.doj.restapi.repository.AccountRepository; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
@Service 
public class AccountService implements IAccountService{ 
 
 @Autowired 
 AccountRepository accountRepository; 
 
 @Override 
 public Account create(Account account) { 
 return accountRepository.save(account); 
 } 
 
 @Override 
 public Account get(Long accountId) { 
 return accountRepository.findOne(accountId); 
 } 
 
 @Override 
 public Account update(Account account) { 
 return accountRepository.save(account); 
 } 
 
 @Override 
 public void delete(Long accountId) { 
 accountRepository.delete(accountId); 
 } 
 
 @Override 
 public AccountList list() { 
 AccountList accountList = new AccountList(); 
 Iterable<;Account>; itr = accountRepository.findAll(); 
 List<;Account>; accounts = new ArrayList<;Account>;(); 
 for(Account account : itr){ 
 accounts.add(account); 
 } 
 accountList.setListOfAccounts(accounts); 
 return accountList; 
 } 
} 
 
</pre>
<p><b>d) Create a Repository class <i>AccountRepository.java</i></b><br />
This is an interface which extends an interface of Spring Data JPA for using CRUD operation over account class.</p>
<pre class="highlight">/** 
 * 
 */ 
package com.doj.restapi.repository; 
 
import org.springframework.data.repository.CrudRepository; 
 
import com.doj.restapi.bean.Account; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
public interface AccountRepository extends CrudRepository { 
 
} 
 
</pre>
<p><b>Step 6: Deploying this application to tomcat server</b></p>
<p><b><i>Right click on project ->; run as ->; run on server</i></b></p>
<p>After starting of tomcat server, Let&#8217;s check our application with Rest client Postman, it is UI based client for testing restful web applications, postman is chrome plugin. Launch postman.</p>
<p><b>a) POST method: CREATE Account Resource using POST http method</b><br />
Post method is used to create new resource. Here we are adding new Account to the account database, so you can see we have used account XML in post body.</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2017/03/Spring-REST-POST.jpg" border="0" /></div>
<p><b>b) GET method: READ Account Resource using GET http method</b><br />
Test our get method Spring REST service. You will get following output as below:</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://3.bp.blogspot.com/-0fKtuhEZrz8/WNqm0cERMpI/AAAAAAAAGJU/5Xn6Yk_AnsEkWAHWQFPFvwI4Ppq5xaIrgCLcB/s1600/Spring-REST-GET.bmp" border="0" /></div>
<p><b>c) PUT method: UPDATE Account Resource using PUT http method</b><br />
Put method is used to update resource. Here we will update name of account holder of accountId=1 using put method. So we will update account XML in body of request of accountId is 1 as below.</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2017/03/Spring-REST-PUT.jpg" border="0" /></div>
<p><b>d) Read All Account Resources using GET http method</b></p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2017/03/Spring-REST-ALL.jpg" border="0" /></div>
<p><b>e) DELETE method: DELETE Account Resource using DELETE http method</b><br />
Delete method is used to delete resource. So here we will pass accountId of account which needs to be deleted as Path Param. We are going delete the account who have accountId=1.</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2017/03/Spring-REST-DELETE.jpg" border="0" /></div>
<p><b>f) Read All Accounts after DELETE Call</b></p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2017/03/Spring-REST-After-delete.jpg" border="0" /></div>
<p> ;</p>
<div style="background-color: #f2f9fc; border:1px solid #c9e6f2;border-radius:3px;padding:16px;line-height:1.45;">
<span style="color: red;font-size: x-large;text-align: center;"><b>Spring MVC Related Posts</b></span></p>
<ol style="text-align: left;"><span style="color: #274e13;"></p>
<li><b><a href="https://dineshonjava.com/spring-web-mvc-framework-chapter-38/"><span style="color: red;">Spring MVC Web Tutorial</span></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-mvc-interview-questions-and-answers/"><span style="color: red;">Spring MVC Interview Questions</span></a></b></li>
<li><b><a href="https://dineshonjava.com/introduction-to-mvc/"><span style="color: red;">MVC Design Pattern</span></a></b></li>
<li><b><a href="https://dineshonjava.com/what-is-dispatcherservlet-in-spring-and-its-uses/"><span style="color: red;">Spring MVC DispatcherServlet </span></a></b></li>
<li><b><a href="https://dineshonjava.com/difference-between-applicationcontext-webapplicationcontext-in-spring-mvc/"><span style="color: red;">Spring MVC WebApplicationContext and Root Application Context</span></a></b></li>
<li><b><a href="https://dineshonjava.com/stereotype-annotations-in-spring/"><span style="color: red;">Spring MVC @Controller Annotation</span></a></b></li>
<li><b><a href="https://dineshonjava.com/requestmapping-annotation-in-spring-mvc/"><span style="color: red;">Spring MVC @RequestMapping Annotation</span></a></b></li>
<li><b><a href="https://dineshonjava.com/requestparam-annotation-in-spring-mvc-with-example/"><span style="color: red;">Spring MVC @RequestParam Annotation</span></a></b></li>
<li><b><a href="https://dineshonjava.com/difference-between-applicationcontext-webapplicationcontext-in-spring-mvc/"><span style="color: red;">Spring MVC ContextLoaderListener</span></a></b></li>
<li><b><a href="https://dineshonjava.com/requestparam-vs-pathvariable-annotations-in-spring-mvc/"><span style="color: red;">Spring MVC @RequestParam and @PathVariable annotations</span></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-30-mvc-hello-world-example/"><span style="color: red;">Spring MVC Hello World Example</span></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-exception-handling-example/"><span style="color: red;">Spring MVC Exception Handling Example</span></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-mvc-with-hibernate-crud-example/"><span style="color: red;">Spring MVC with Hibernate CRUD Example</span></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-3-mvc-tiles-plugin-with-example/"><span style="color: red;">Spring MVC Tiles Plugin with Example</span></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-3-mvc-and-interceptor-with/"><span style="color: red;">Spring MVC Interceptor with example</span></a></b></li>
<li><b><a href="https://dineshonjava.com/integration-spring-mvc3-and-mongodb/"><span style="color: red;">Spring MVC with MongoDB CRUD Example</span></a></b></li>
<li><b><a href="https://dineshonjava.com/spring-3-mvc-internationalization/"><span style="color: red;">Spring MVC Internationalization &#038; Localization with Example</span></a></b></li>
<p></span></ol>
</div>
</div>
<div class="wp-post-navigation"> 
									 <div class="wp-post-navigation-pre"> 
									 <a href="https://dineshonjava.com/spring-rest-client-resttemplate-consume-restful-web-service-example-json/">Previous</a> 
									 </div> 
									 <div class="wp-post-navigation-next"> 
									 <a href="https://dineshonjava.com/customizing-httpmessageconverter-with-spring-mvc-in-rest/">Next</a> 
									 </div> 
									</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
 $.post('https://dineshonjava.com/wp-admin/admin-ajax.php', {action: 'mts_view_count', id: '39'});
});
</script>
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…