Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/athiththan11/hibernate-crud

CRUD Application with Hibernate and PostgreSQL
https://github.com/athiththan11/hibernate-crud

crud-application elephantsql hibernate hibernate-orm java-8 maven postgresql restful-api

Last synced: about 5 hours ago
JSON representation

CRUD Application with Hibernate and PostgreSQL

Awesome Lists containing this project

README

        

# Hibernate CRUD

A simple student CRUD Application with Hibernate and PostgreSQL (hosted on [ElephantSQL](https://www.elephantsql.com/))

Checkout the live demo [Deployed on Heroku](https://hibernate-crud.herokuapp.com)

## Usage

Clone or download the application and replace the configuration and connection properties.

Build the application using the following command

```bash
mvn clean install package
```

and deploy it in your favourite application server.

## API Endpoints

- GET [/api/students](http://localhost:8080/hibernate/api/students) : to read all students
- GET [/api/students/{id}](http://localhost:8080/hibernate/api/students/4) : to read a particular student object
- POST [/api/students](http://localhost:8080/hibernate/api/students) : to save a student object

The request should send a body in `application/json` format as follows

```json
{
"name": "Github",
"username": "github",
"email": "[email protected]"
}
```

- PUT [/api/students/{id}](http://localhost:8080/hibernate/api/students/4) : to update a student object

The request should send a body in `application/json` format as follows

```json
{
"name": "Github Microsoft",
"username": "github",
"email": "[email protected]"
}
```

- DELETE [/api/students/{id}](http://localhost:8080/hibernate/api/students/5) : to delete a student object