Spring MVC CRUD Example
CRUD (Create, Read, Update and Delete) application is the most important application for creating any project. It provides an idea to develop a large project. In spring MVC, we can develop a simple CRUD application.
Here, we are using JdbcTemplate for database interaction.
Required Jar files
To run this example, you need to load:
Here, we are using emp99 table of oracle 10g database which has 4 fields: id, name, salary and designation. Here, id is auto incremented which is generated by sequence.
Spring MVC CRUD Exampleindex.jsp
Here "/SpringMVCCRUDSimple" is the project name, change this if you have different project name. For live application, you can provide full URL.
Click on "Add New Employee" link, you will see following form.
Fill data and click on save button. You will see employees list.
Now click on "edit" link, a form will appear with the data.
Now change the data of the form and click on "edit save" button.
Now click on "delete" link, you will see employees list with deleted record.
Download Spring MVC CRUD Example
We have created this application in MyEclipse IDE which already provides the jar files. If you use eclipse or other IDE's, you need to load the jar file for spring MVC.