Skip to content

Crud Example With Spring Data Jpa Using Multiple Associations

Notifications You must be signed in to change notification settings

andersonhsporto/JpaRelationships

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JpaRelationships

A simple CRUD example with Spring Data JPA using multiple associations

Relationship Schema:

Schema

Methods

Requests to the API must follow the standards:

Method Description
GET Retrieve information about the resource.
POST Create a new resource.
PUT Update a resource.
DELETE Delete a resource or related component.

Domain [/domain]

List all domains (List) [GET /domain]

  • Request (application/json)

  • Response 200 (application/json)

[
    {
        "id": 1,
        "name": "Eukarya",
        "kingdom": "Plantae"
    }
]

New domain (Create) [POST /domain]

  • Attributes (object)

    • name: name of domain
    • kingdom: child kingdom
  • Request (application/json)

    • Body
{
  "name": "Eukarya",
  "kingdom": "Plantae"
}
  • Response 200
Domain created successfully

Removal (Delete) [DELETE /domain]

  • Attributes (object)

    • domain_id: id of domain
  • Request (application/json)

    • Body
{
  "domain_id": "3"
}
  • Response 200
Domain deleted successfully

About

Crud Example With Spring Data Jpa Using Multiple Associations

Topics

Resources

Stars

Watchers

Forks

Languages