Skip to content

Here i have added some useful examples of restapis and user login and signup which is very important for making Restful api services.

Notifications You must be signed in to change notification settings

Subhashchandra-Birajdar/Registration-Login-Spring-Boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About Registration-Login Project

Here i have added some useful examples of restapis and user.
login and signup which is very important for making Restful api services.

Project MetaDeta

Use the project set up a new Spring Boot project. It allows you to generate a ready-to-use project structure.

group - com.foodApp.UserLogin
Artifact - Registration - Login
Name - Registration - Login
Description - Spring Boot project for Registration and Login
Package name - com.foodApp_UserLogin

Required Dependency for Development

# 'First dependency'
1.Spring web

# 'Second dependency'
2.spring data jpa

# 'Third dependency'
3.lombok

# 'Fourth dependency'
4.postgre SQL Driver/My SQL Driver

# 'Fifth dependency'
5.spring boot DevTools

Project Configuration (application.properties)

#db configuration
spring.datasource.url=jdbc:postgresql://localhost:5432/Registration-Login
spring.datasource.username=postgres
spring.datasource.password=root

# Hibernate properties
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.format_sql=true

EndPoints and Json Body

Create Registration/SignUp
Request : http://localhost:8080/api/signUp
Json Body : 
{
    "userName":"vinayakfarud",
    "password":"passasc",
    "mobileNo":"9099604580",
    "email":"vinayak@gmail.com"
}
ResponseBody :
{
    "userId": 2,
    "userName": "vinayakfarud",
    "password": "passasc",
    "mobileNo": "9099604580",
    "email": "vinayak@gmail.com"
}

Login User

Request : Post : http://localhost:8080/api/login
Json Body :
{
    "userId":2,
    "userName":"vinayakfarud",
    "password": "passasc"
}
Response : 
CurrentUserSession(id=1, userId=2, uuid=179190, localDateTime=2024-08-10T10:28:14.194274100)

Update User

Request::Put : http://localhost:8080/api/updateSignUp?key=179190
Json Body :
{
   "userId": 2,
    "userName":"vinayak",
    "password":"passasc",
    "mobileNo":"9099604589",
    "email":"vinayak9@gmail.com"
}
Response :
{
    "userId": 2,
    "userName": "vinayak",
    "password": "passasc",
    "mobileNo": "9099604589",
    "email": "vinayak9@gmail.com"
}

Logout user

Request : Patch : http://localhost:8080/api/logout?key=179190
Response : Logged Out......

About

Here i have added some useful examples of restapis and user login and signup which is very important for making Restful api services.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages