Branch: master
Find file History
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main @SpringBootApplication annotation on Application class. May 24, 2015
pom.xml Updated to Spring Boot 1.2.3-RELEASE. Apr 14, 2015 Updated to Spring Boot 1.2.3-RELEASE. Apr 14, 2015

Use a MySQL database in a Spring Boot Web Application through Hibernate

See here for more informations:


  • Run the application and go on http://localhost:8080/
  • Use the following urls to invoke controllers methods and see the interactions with the database:
    • /user/save?email=[email]&name=[name]: create a new user with an auto-generated id and email and name as passed values.
    • /user/delete?id=[id]: delete the user with the passed id.
    • /user/get-by-email?email=[email]: retrieve the id for the user with the passed email address.

Build and run


Open the file and set your own configurations for the database connection.


  • Java 7
  • Maven 3

From terminal

Go on the project's root folder, then type:

$ mvn spring-boot:run

From Eclipse (Spring Tool Suite)

Import as Existing Maven Project and run it as Spring Boot App.