![]()
In this tutorial series, we will go through a journey of learning stuffs that will make us comfortable with integrating MyBatis 3 and Spring MVC 3 to perform a CRUD operation on database.
Example Project description:
We have a domain object called User with four properties name, standard, age and sex. We will perform CRUD operation from a web page which will be like the following :
Spring MVC and MyBatis 3 Integration - User Form
The registration form will provide a way to create new user or modify existing user. The bellow table will show all users present in database. Clicking on the table row, the data corresponding to the clicked row will be available for updation :
Spring MVC and MyBatis 3 Integration - User Form with update data
On this state if you change any value of form and click on “Save Changes” button, it will be reflected to bellow table row data and also database values.
Spring MVC and MyBatis 3 Integration - User Form to update data
I have changed the value of standard from “MCA” to “B.Tech” and then click on “Save Changes” button and get following page:
Spring MVC and MyBatis 3 Integration - Data table with updated data
In this series, we will have following session to complete our full example:
- Creating DAO class using MyBatis 3 that will help to perform CRUD operations on database.
- Setting Environment for integrating MyBatis 3 and Spring MVC 3 frameworks.
- Creating Spring MVC 3 controller for performing CRUD operation.
You can download the source code and war file from following links:
Source (Eclipse Project without jars) : Download
War (With jars) : Download