Skip to content

gandhiamarnadh/spring-boot-mysql-jpa-hibernate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use JPA + Hibernate + MySQL in Spring Boot

See here for more informations: http://blog.netgloo.com/2014/10/06/spring-boot-data-access-with-jpa-hibernate-and-mysql/

Usage

  • 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

Configurations

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

Prerequisites

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages