Skip to content

A sample of REST web service project using Java and Gradle

Notifications You must be signed in to change notification settings

quangctkm9207/rest-webservice-gradle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST webservice with Gradle

A simple example associated with my blog post.

In this project, PostgreSQL database is used to persist data. So, make sure to install it and replace your own database credentials in NoteDatabase.java file. I am sorry for making it more complex than it was expected.

Run

$ ./gradlew appRun

APIs

  • Get all notes
    • Method: GET
    • URL: localhost:8080/api/v1/notes
    • Response body data type: Plain Text
    • Success code: 200 Ok
  • Add new note
    • Method: POST
    • URL: localhost:8080/api/v1/notes
    • Success code: 201 Created
  • Get a note
    • Method: GET
    • URL: localhost:8080/api/v1/notes/{noteId}
    • Response body data type: Plain Text
    • Success code: 200 Ok
  • Update a note
    • Method: PUT
    • URL: localhost:8080/api/v1/notes/{noteId}
    • Request body data type: Plain Text
    • Response body data type: Plain Text
    • Success code: 200 Ok
  • Delete a note
    • Method: DELETE
    • URL: localhost:8080/api/v1/notes/{noteId}
    • Success code: 204 No Content

About

A sample of REST web service project using Java and Gradle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages