Skip to content

kamolchanokTa/IOptikService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using MySQL in Spring Boot via Spring Data JPA and Hibernate

Build and run

Configurations

Open the application.properties file and set your own configurations.

Prerequisites

  • Java 8
  • Maven > 3.0
  • Create Database OpticalShop in mySql: please make sure that run port 8889

From terminal

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

$ mvn spring-boot:run

From Eclipse (Spring Tool Suite)

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

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:
    • /create: create a new user with an auto-generated id and UserRequest as json values in post request Hint: use Postman for making request as test
    • /delete?id=[id]: delete the user with the passed id.
    • /get-by-email?email=[email]: retrieve the id for the user with the passed email address.

About

This project is the back-end of optical e-commerce website which is developed for AIT course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages