Skip to content

Sample Spring Hibernate Application Using Annotations

Notifications You must be signed in to change notification settings

dilanka92/Spring4Hibernate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Spring Hibernate Application Using Annotations

In this project i have integrate Spring with Hibernate using annotation based configuration. I have developed a simple CRUD oriented web application containing a form asking user input, saving that input in MySQL database using Hibernate, retrieving the records from database and updating or deleting them within transaction, all using annotation configuration.

Testing I have added unit and integration test using TestNG, mockito, spring-test, DBUnit & H2 database

Following technologies being used

  • Spring 4.0.6.RELEASE
  • Hibernate Core 4.3.6.Final
  • Validation-api 1.1.0.Final
  • Hibernate-validator 5.1.3.Final
  • MySQL Server 5.6
  • Maven 3
  • JDK 1.8
  • Tomcat 9.0.0.M21
  • Eclipse JUNO Service Release 2
  • TestNG 6.9.4
  • Mockito 1.10.19
  • DBUnit 2.2
  • H2 Database 1.4.187

Following is the final project structure

alt text

alt text

Create Schema in database

 CREATE TABLE EMPLOYEE(
    id INT NOT NULL auto_increment, 
    name VARCHAR(50) NOT NULL,
    joining_date DATE NOT NULL,
    salary DOUBLE NOT NULL,
    ssn VARCHAR(30) NOT NULL UNIQUE,
    PRIMARY KEY (id)
); 

About

Sample Spring Hibernate Application Using Annotations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages