Skip to content

Latest commit

 

History

History
98 lines (70 loc) · 1.99 KB

readme.md

File metadata and controls

98 lines (70 loc) · 1.99 KB

Prerequisites

1. How to start

$ git clone https://github.com/crkarthik11/lably.git
$ cd lably
$ ./gradlew
$ ./gradlew bootRun
$ curl -v localhost:8080

2. How to access swagger

Swagger URL: http://localhost:8080/swagger-ui.html

2. How to access H2 console

Swagger URL: http://localhost:8080/database

DI: https://docs.spring.io/spring-boot/docs/2.0.x/reference/html/using-boot-spring-beans-and-dependency-injection.html

Rest controller

  • Get
    • Path Param
    • Request Param
  • Post
    • Request Body

Spring data

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/

  • Inbuilt CRUD queries
  • Automatic Custom Queries
  • Manual Custom Queries

Entities to create

Lab

  • String name
  • String address
  • String phone
  • String pinCode

Test

  • String name
  • String description
  • Double price

Admin

  • String name
  • String username
  • String password

Customer

  • String name
  • String address
  • String age
  • String gender

APIs

Admin controller

  • Add Admin (POST) ("/addAdmin")
  • List of admins - Must return 5 admin objects (GET) ("/getAdmins")
  • API to return single admin by username (GET)

Lab controller

  • Add Lab (Post)
  • List of labs - Must return 5 labs in list (GET)
  • API to return single lab by name (GET)

Test controller

  • Add Test (Post)
  • List of Test - Must return 5 Test in list (GET)
  • API to return single Test by name (GET)

Customer controller

  • Add Customer (Post)
  • List of Customer - Must return 5 Customer in list (GET)
  • API to return single Customer by username (GET)

Refs

SELECT * from TBL_ADMIN WHERE department = 'CSE' SELECT admin FROM Admin admin WHERE admin.department = :department