Skip to content

jedicode/SpringBootMicroservices

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UserRecord REST API CI Status

Demonstrates a simple RESTful web service using Spring Boot and Java.This web service provides an in-memory UserRecord service, with the capability to get a all User information in the System, create user info,update user info, delete user info,user can be singIn in system,and logIn in system. After exploring this project, We will understand the three common layers of a RESTful web service (namely domain, data source, and presentation), the common design decisions used when creating a web service, and the functionality provided by the Spring framework for creating a web service (as well as supplemental functionality, such as creating HATEOAS links). In particular,We can aslo create OpenAPI Documantion with Swagger links).And expose the following API Endpoints.

  • We can create a domain model with the help of lombok this easy beacuse we can reduce the boilerplate code.
  • We can store domain objects in a persistence layer with the help of JPA
  • We can wrap domain objects within resource objects.
  • We can add HATEOAS links) links to a resource.Beacuse we can create self discoverable API.
  • We can serve up resources to a client over HTTP
  • We can provide RESTfull CreateUser,UpdateUser,DeleteUser,SearchUser,LoginUser,SingUpUser,AllUser this operations to change domain objects.
  • We can create unit,integration with Individual Layer Controller,Service,Repository that exercise a REST API. this test create with the help of Mockito & Junit5.
  • We can Document Your API Enpoint With Swagger.
  • We can expose your API Endpoint with Swagger & Postman.
  • We can Version Your API to maintain forward and backward compatibality Best practices for API versioning.
  • We can determine your CodeCoverage.
  • We can Configure your In-Memory Database apacheDerby.
  • We can debug your In-Memory Database console.
  • We can also understand slicing different components in UnitTest.
  • We can also profiling & Seprate cross cutting concerns the whole project with the help pf AspectJ.

Starting the UserRecord REST API

To start this web service,We can use SpringInitializr to build your all dependency in Maven Project.

Once the web service is started, it can be reached at

http://localhost:8080

REST Endpoints

The following REST endpoints are available upon deployment of the order management system:

HTTP Verb URL Description Status Codes
GET http://localhost:8080/user/api/show_all_users/v1.0 Obtains a list of all existing User
  • 200 OK
POST http://localhost:8080/user/api/search_user/v1.0 Obtains the User corresponding to the supplied User ID
  • 200 OK if User exists
  • 404 Not Found if User does not exist
POST http://localhost:8090/user/api/create_user/v1.0 Creates a new User based on the payload contained in the request body
  • 201 Created if User successfully created
PUT http://localhost:8080/user/api/updateuser/v1.0 Updated an existing User with the data contained in the request body
  • 200 OK if User succesfully updated
  • 404 Not Found if User does not exist
DELETE http://localhost:8080/user/api/deleteuser/v1.0 Deletes an existing User that corresponds to the supplied User ID
  • 203 No Content if User succesfully deleted
  • 404 Not Found if User does not exist
POST http://localhost:8080/user/api/singin/v1.0 User can be singUp with credentials in payload
  • 201 Created if User successfully singUp
POST http://localhost:8080/user/api/login/v1.0 User can be Login with credentials in payload
  • 200 OK if User successfully login

About

Jenkins Pipline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%