Skip to content

r-i-c-h-a/spring-boot_mysql_basic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mysql_basic

Create MySql database

create database user_db;
create user 'mysql_access'@'%' identified by 'mysql123';

grant all on db_example.* to 'mysql_access'@'%';

Build

cd mysql-basic-functionalities

mvnw spring-boot:run

Test cases

Create new user

curl localhost:8080/access/newUser -d name=[name] -d email=[email] -d phone=[phone] -d DOB=[DOB] -d gender=[M/F]

Get all users

curl localhost:8080/access/getAll

Update user

curl localhost:8080/access/update/{id} -d {enter the parameters you want to update}
Eg. curl localhost:8080/access/update/1 -d gender=M -d email=abc@email.com

Get random quote

curl localhost:8080/access/randomQuote