• +62 (081) 322 209080
  • Choose your language:

Blog

Insights and ideas for software startups. We provide advice and insights for entrepreneurs.

JPA Hibernate

JPA Hibernate Example Using Spring Framework MVC 3.1

JPA stands for Java Persistence API. It is a Java programming language specification which manages relational data in applications using Java SE (Java Standard Edition) and Java EE (Java Enterprise Edition. JPA focuses on object-relational mapping (ORM) and can be implemented in ORM vendors such as EclipseLink, OpenJPA, IBM and JBoss with Hibernate.

Why Should We Use JPA – Hibernate Instead of Directly Writing SQL Queries or Creating an Access to JDBC?

JPA – Hibernate removes the boiler plate code, and creates clean and reusable query specifications. We can focus on creating a domain model, with persistence being a second concern. The result of the query is mapped to an Object called POJO (Plain Old Java Object) which has no dependencies on any frameworks.

In this tutorial, we show you how to create a WEB application using JPA – Hibernate and Spring Framework MVC 3.1. It should save username in the database via WEB browser and displays the username entries in an HTML table. Let’s call the WEB application JPA Hibernate Example.

Requirement

The required technologies are following:

  1. Java Runtime Environment (JRE). Click here to download.
  2. Spring Tool Suite (STS). Click here to download.
  3. MySQL as an RDBMS (Relational Database Management System. Click here download XAMPP to install Apache distribution containing MySQL, PHP and Perl.
  4. Spring Framework 3.1.0.M1. Click here to download.
  5. JPA 2.0 – Hibernate 4.0 JAR libraries. They are provided in our source-code below.

Now, let’s start creating the JPA Hibernate Example and open the Spring Tool Suite.

Open the Spring Tool Suite (STS)

Select the directory of your workspace:

JPA - Hibernate Example - Create a Dynamic Web Project

Create a Java Dynamic Web Project

Right-click in the package explorer and select New -> Dynamic Web Project:

JPA - Hibernate Example - Create a Dynamic Web Project

Enter a project name jpa-hibernate-example and press finish button:

JPA - Hibernate Example - Entery Project Name

Import the required JAR libraries

Into our web dynamic project, we import the Spring Framework MVC 3.1 libraries that are distributed from the Spring Framework 3.1.0.M1 and JPA – Hibernate libraries as well. The needed JAR libraries are following:

  1. antlr-2.7.7.jar
  2. aopalliance-1.0.jar
  3. commons-collections-3.2.1.jar
  4. commons-logging-1.1.1.jar
  5. dom4j-1.6.1.jar
  6. hibernate-commons-annotations-4.0.0.CR2.jar
  7. hibernate-core-4.0.0.CR4.jar
  8. hibernate-entitymanager-4.0.0.CR4.jar
  9. hibernate-jpa-2.0-api-1.0.0.Final.jar
  10. hibernate-validator-4.2.0.Final.jar
  11. javassist-3.12.1.GA.jar
  12. jboss-logging-3.0.1.GA.jar
  13. jboss-transaction-api_1.1_spec-1.0.0.Final.jar
  14. jpa-api-2.0-cr-1.jar
  15. jstl-1.1.2.jar
  16. mysql-connector-java-5.1.15-bin.jar
  17. org.springframework.aop-3.1.0.M1.jar
  18. org.springframework.asm-3.1.0.M1.jar
  19. org.springframework.beans-3.1.0.M1.jar
  20. org.springframework.binding-2.3.0.RELEASE.jar
  21. org.springframework.context-3.1.0.M1.jar
  22. org.springframework.core-3.1.0.M1.jar
  23. org.springframework.expression-3.1.0.M1.jar
  24. org.springframework.jdbc-3.1.0.M1.jar
  25. org.springframework.orm-3.1.0.M1.jar
  26. org.springframework.oxm-3.1.0.M1.jar
  27. org.springframework.transaction-3.1.0.M1.jar
  28. org.springframework.web.servlet-3.1.0.M1.jar
  29. org.springframework.web-3.1.0.M1.jar
  30. servlet-api-5.5.15.jar
  31. slf4j-api-1.6.1.jar
  32. standard-1.1.2.jar

To import JAR libraries, copy the jar libraries mentioned above in the /WEB-INF/lib directory.

  1. Note: The /WEB-INF directory contains a Web archive’s private files and directories. It is automatically created after you create a dynamic web project. Click here to see the screen shot.
  2. Note: All jar libraries residing in the directory lib will be automatically loaded if the server is started.

Create a Deployment Descriptor – web.xml

Create an XML file with the filename web.xml in the /WEB-INF directory and add the following codes:


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_ID" version="2.4">
  <display-name>jpa-hibernate-example</display-name>
  <servlet>
    <servlet-name>jpa-hibernate-example</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>jpa-hibernate-example</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>
</web-app>

For more explanation, please see the article the Hello World Example using Spring Framework MVC 3.1

Register the Servlet

Create a main servlet with the name jpa-hibernate-example-servlet.xml in the /WEB-INF directory.
The jpa-hibernate-example-servlet.xml file must be written the same as the corresponding servlet name defined in the web.xml concatenated with “-servlet.xml” and put in the /WEB-INF directory and add the following codes:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
	
    <context:property-placeholder location="classpath:jdbc.properties" />
    
    <import resource="persistenceContext.xml" />
    
	<!-- Activates various annotations to be detected in bean classes -->
	<context:annotation-config />

	<!-- Scans the classpath for annotated components that will be auto-registered as Spring beans.
	 For example @Controller and @Service. Make sure to set the correct base-package -->
	<context:component-scan base-package="com.flacom" />

	<!-- Configures the annotation-driven Spring MVC Controller programming model.
	Note that, with Spring 3.0, this tag works in Servlet MVC only!  -->
	<mvc:annotation-driven /> 
	
	<!-- Declare a view resolver -->
	<bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" 
    		p:prefix="/WEB-INF/view/" p:suffix=".jsp" p:order="1"/>
    		
</beans>

Explanation

  1. The tag <context:property-placeholder> is to load java properties file for Spring-based applications. In this case, we declare “jdbc.properties” to get database source parameters such as JDBC driver, JDBC URL, etc.
  2. The tag <import > is to import additional XML configuration file. In this case, we import the XML configuration file “persistenceContext.xml” to configure our JPA – Hibernate persistence parameters
  3. For the detail explanations for the other tags, please see the article the Hello World Example using Spring Framework MVC 3.1

Register the Persistence XML Configuration File

Create a persistence XML configuration file with the name persistenceContext.xml in the /WEB-INF directory and add the following codes:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
          http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
          http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
          http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
              
    <tx:annotation-driven transaction-manager="transactionManager"/>

    <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="${jdbc.driver}" />
        <property name="url" value="${jdbc.url}"/>
        <property name="username" value="${jdbc.username}"/>
        <property name="password" value="${jdbc.password}"/>
    </bean>

    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
        <property name="entityManagerFactory" ref="entityManagerFactory" />
    </bean>
       
    <bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate"> 
        <property name="entityManagerFactory" ref="entityManagerFactory" />
    </bean>
       
    <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="jpaVendorAdapter" ref="jpaAdapter" />
        <property name="persistenceUnitName" value="jpa-hibernate-example-PU" />
        <property name="loadTimeWeaver">
            <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" />
        </property>
    </bean>

    <bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
        <property name="databasePlatform" value="org.hibernate.dialect.MySQL5InnoDBDialect" /> 
        <property name="generateDdl" value="true" />
        <property name="showSql" value="false" />
    </bean>
</beans>	
</beans>

Explanation

  1. The tag <tx:annotation-driven > is to manage various persistence annotations to be detected in bean classes.
  2. The bean “PersistenceAnnotationBeanPostProcessor” is declared to process PersistenceUnit and PersistenceContext annotations.
  3. The bean “DriverManagerDataSource” is declared to implement the standard JDBC DataSource interface, to configure the JDBC DriverManager, and to return a new connection from every getConnection call.
  4. The bean “JpaTransactionManager” is declared to bind a JPA EntityManager, to allow for one thread-bound EntityManager per factory and to access multiple transactional resources within the same transaction. In this example we use “LocalContainerEntityManagerFactoryBean” as an implementation of EntityManager
  5. The bean “LocalContainerEntityManagerFactoryBean” is used by the bean “JpaTransactionManager” to creates a JPA EntityManagerFactory and it is the most powerful way to set up a shared JPA EntityManagerFactory. And if we want to switch it to another JNDI lookup or to a LocalEntityManagerFactoryBean definition, we just have to change the configuration parameters.
  6. The bean “HibernateJpaVendorAdapter” is declared to specify Hibernate implementation as a JPA vendor. It will initialize appropriate defaults for Hibernate, such as persistence provider class and JpaDialect, etc.

Create a Java Properties File for JDBC Data Source

Create Java Properties File with the name jdbc.properties by right-clicking the src folder in the project, New and select File . We a Java Properties file with the name “properties” and press the button finish. After that, add the following codes:

### LOCAL
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/jpa_hibernate_example?characterEncoding=utf8
jdbc.username=root
jdbc.password=

Explanation

  1. It declares the JDBC configuration parameter values such as JDBC driver MySQL, the database name (jpa_hibernate_example), the username and password of the JDBC System (In this case, it is your MySQL username and password)

Create a Domain Model

A domain model is a list of entities in the domain, defining their relationships (such as objects, relationships, and cardinality). In our example, we use annotated POJO (Plain Old Java Object) as our domain model for JPA.

We create it by right-clicking the src folder in the project, New and selecting create a package. We create a package with the name “com.flacom.jpa.hibernate.example.domain.user” and press the button finish. After that, we create a Java file inside that package with the file name “User.java” by right-clicking the package, New and selecting Class.

Inside the “User.java“, we put the following code:

package com.flacom.jpa.hibernate.example.domain.user;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

@Entity
public class User implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @Id
    @GeneratedValue
    private long id;
    
    private String username;
    
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
}

Explanation

  1. The annotation @Entity is to indicate that this POJO (as a Java bean) is a persistent entity. All classes annotated through @Entity will be picked up automatically by JPA.
  2. The annotation @Id sets the field as a primary key.
  3. The annotation @GeneratedValue specifies a value which will be generated automatically for that field.

Create an XML Confifuration for Persistence Unit

We create it by right-clicking the src folder in the project, New and select create a folder. We create the folder with the name “META-INF” and press the button finish. After that, we create an XML file inside that package with the file name “persistence.xml” by right-clicking the package, New and selecting XML File.

Inside the “persistence.cml“, we put the following code:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="jpa-hibernate-example-PU" transaction-type="RESOURCE_LOCAL">
	
	<class>com.flacom.jpa.hibernate.example.domain.user.User</class>
	
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    
  </persistence-unit>
</persistence>

Explanation

  1. We register the entity class “com.flacom.jpa.hibernate.example.domain.user.User” in the Persistence Unit (PU). The domain model will be created automatically in the Database according to its relationships (ORM)

Create an Abstract Repository

The abstract repository is to create an abstraction for the method create, edit, and delete for the classes that inherit the abstract repository.

We create it by right-clicking the src folder in the project, New and select create a package. We create a package with the name “com.flacom.jpa.hibernate.example.repository” and press the button finish. After that, we create a java file inside that package with the file name “AbstractRepository.java” by right-clicking the package, New and selecting Class.

Inside the “AbstractRepository.java“, we put the following code:

package com.flacom.jpa.hibernate.example.repository;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

public class AbstractRepository<T> {
    
	@PersistenceContext
    protected EntityManager entityManager;
    
    public T persist(T t) {
        
        entityManager.persist(t);
        
        return t;
    }
    
    public T merge(T t) {
        
        return entityManager.merge(t);
    }
    
    public void remove(T t) {
        
        entityManager.remove(t);
    }
    
}

Explanation

  1. The annotation @PersistenceContext registers an EntityManager automatically and injects it into the entityManager field.
  2. The methods “persist”, “merge”, and “remove” are defined to be reused through any class that inherits the AbstractRepository class.

Create a User Repository

The User Repository is to handle the persistence of the domain model (in this case User) to and from a database. It manages also special exception translation (from JDBC, Hibernate or some others).
For more information, please see Spring Framework – Data Access/Integration layer

We create it by right-clicking the src folder in the project, New and select create a package. We create a package with the name “com.flacom.jpa.hibernate.example.repository.user” and press the button finish. After that, we create a java file inside that package with the file name “UserRepository.java” by right-clicking the package, New and selecting Class.

Inside the “UserRepository.java“, we put the following code:

package com.flacom.jpa.hibernate.example.repository.user;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.flacom.jpa.hibernate.example.domain.user.User;
import com.flacom.jpa.hibernate.example.repository.AbstractRepository;

@Repository("userRepository")
public class UserRepository extends AbstractRepository<User> {
    
	@SuppressWarnings("unchecked")
    public List<User> getAll() {
        return entityManager.createQuery("SELECT u FROM User u ORDER BY u.username").getResultList();
    }
}

Explanation

  1. The annotation @Repository is to register the class as a repository bean to be able to handle the persistence of the domain model.
  2. The method “getAll()” is defined to get all entries in the table “User” from the database.

Create a User Service Interface

We create it by right-clicking the src folder in the project, New and select create a package. We create a package with the name “com.flacom.jpa.hibernate.example.service.user” and press the button finish. After that, we create a java file inside that package with the file name “UserService.java” by right-clicking the package, New and selecting Interface.

Inside the “UserService.java“, we put the following code:

package com.flacom.jpa.hibernate.example.service.user;

import java.util.List;

import com.flacom.jpa.hibernate.example.domain.user.User;

public interface UserService {
    
   List<User> getAll() throws Exception;
   
   User create(User user) throws Exception;
   
}

Create a User Service Implementation

We create it by right-clicking the src folder in the project, New and select create a package. We create a package with the name “com.flacom.jpa.hibernate.example.service.implementation.user” and press the button finish. After that, we create a java file inside that package with the file name “UserServiceImpl.java” by right-clicking the package, New and selecting Class.

Inside the “UserServiceImpl.java“, we put the following code:

package com.flacom.jpa.hibernate.example.service.implementation.user;

import java.text.ParseException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.flacom.jpa.hibernate.example.domain.user.User;
import com.flacom.jpa.hibernate.example.repository.user.UserRepository;
import com.flacom.jpa.hibernate.example.service.user.UserService;

@Service("userService")
@Transactional(readOnly = true)
public class UserServiceImpl implements UserService {
	
    @Autowired
    private UserRepository userRepository;
    
    public List<User> getAll() {

        return userRepository.getAll();
    }
    
    @Transactional(readOnly = false)
    public User create(User user) throws ParseException {

    	return userRepository.merge(user);
        
    }
    
}

Create a Controller

After having created the Spring Framework MVC 3.1, Persistence configuration files, domain model, repository and service, finally we create the controller to manage the view including URI. Right-click the src folder in the project, New and select create a package. We create a package with the name “com.flacom.jpa.hibernate.example.web” and press the button finish. After that, we create a java file inside that package with the file name “HomeController.java” by right-clicking the package, New and selecting Class.

Inside the “HomeController.java“, we put the following code:

package com.flacom.jpa.hibernate.example.web;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.flacom.jpa.hibernate.example.domain.user.User;
import com.flacom.jpa.hibernate.example.service.user.UserService;

@Controller
@RequestMapping(value={""})
public class HomeController {

	@Autowired
	private UserService userService;
	
	@RequestMapping(value={"","/"})
	public ModelAndView home() throws Exception{
		
		Map<String, Object> params = new HashMap<String, Object>();
		
		List<User> users = userService.getAll();
		
		params.put("users", users);
		
		params.put("user", new User());
		
		return new ModelAndView("home", params);
	}
	
	@RequestMapping("/save")
	public ModelAndView save(@ModelAttribute("user") User user) throws Exception{
		
		Map<String, Object> params = new HashMap<String, Object>();
		
		if(!StringUtils.hasText(user.getUsername())){
			
			params.put("usernameMessage", "Input required");
			
			return new ModelAndView("home", params);
			
		}
		
		userService.create(user);
		
		return new ModelAndView("redirect:/");
	}
}

Create a View

We create the last needed file namely the Java web page “home.jsp“.
First we create a folder “view” in the /WEB-INF directory by right-clicking the JPA – Hibernate Example – /WEB-INF directory, the select New, Folder and enter the folder name “view” and pressing the button Finish. After that, we create the file home.jsp inside the folder “view” we created just now and add the following code:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JPA - Hibernate Example</title>
</head>

<body>
	<h1>JPA - Hibernate Example</h1>
	
	<h2>Add User: </h2>
	
	<form:form method="post" modelAttribute="user" action="save">
	
	<p> <label>Username: </label> <form:input class="input-small" path="username" />
		<label>${usernameMessage}</label></p>
	
	<p><input class="button" type="submit" name="submit" value="Add" /></p>
	
	</form:form>
	
	<h2>List of Users</h2>
	
	<table>
		<tr>
			<th>ID</th>
			<th>Username</th>
		</tr>
		
		<c:forEach items="${users}" var="userVar" varStatus="status">
		
		<tr>
			<td>${userVar.id}</td>
			<td>${userVar.username}</td>
		</tr>
		
		</c:forEach>
		
	</table>

</body>
</html>

The Project Structure

At the end, the structure of the project should look like following:

Structure of the Project in the Project Explorer

Create a Database

We have to start MySQL and add a database. To do so, we do it via PHPMyAdmin. Open your internet browser and hit the URL “http://localhost/phpmyadmin” and enter the login and password if needed. After that, click on “Database” and create a database with the name “jpa_hibernate_example” and press the button “Create“.

Hibernate Example - Create a Database in MySQL

Prepare the server

Now, let’s run the web application and call it in the web browser.

Before the JPA Hibernate Example can be hit in the web browser, we have to register the JPA Hibernate Example in the Java server and and start it.

Add the Application in the Server

Register the JPA Hibernate Example in the Java server by right-clicking VMware vFabric tc Server Developer in the tab Servers and selecting Add and remove as displayed in the following screen shot:

Add the Web Project to the Server

and select the project jpa-hibernate-example, click add and press the button Finish:

Select the Project

Start the Server

After the project jpa-hibernate-example is added, we can start the server by clicking the start button as described below:

Start the Server

Call the URL and Let’s Enter the Username Data

If there is no error in the STS console, we can see our JPA Hibernate Example in the web broswer.
Open the web browser and type “http://localhost:8080/jpa-hibernate-example” in the address field and press enter. You will see the following image:

Type the URL in Your Internet Browser to See the Result

There you can try to add a random username and press the button “Add”. If you are able to see the username entries in the HTML table, it means you have succeeded to create the JPA Hiberbernate Example.

Congratulation!

You created just now the JPA Hibernate Example using Spring Framework MVC 3.1.

The full project source code (incl. jar libraries), you can download here – jpa-hibernate-example.jar.

If you may meet challenges, you can contact us. Please give feedback or comments in this post.

Jemmy Halim…

Jemmy is a person into technical details of developing WEB applications and their highly advanced back end. He earns his daily bread as a computer scientist and works on building WEB and Mobile Applications, Content Management Systems, and Money-Generating Software Solutions.
  • Jai Singh Saini

    Very Nice example to implement Spring integration with hibernate using JPA.

  • Rocky Takela Simanjuntak

    can i use the latest version of Spring Framework instead of 3.1.0.M1 version?. I can’t find the 3.1.0.M1 version in spring.io.
    thanks.

  • http://www.flacom.com/ Flacom

    Yes, Rocky, you can use the latest version of Spring Framework and ensure to fix any deprecated calls in the source code regarding outdated APIs.

  • Nagesh Raykar

    sir this example is spring MVC JPA with hibernate ??
    how to integrate inside spring batch technique

  • Canberk

    Thank you sir. It is a great example with clear steps.