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

https://github.com/artysta/spring-simplest-rest-api-app

Pretty simple Spring REST API application using Spring Boot, Spring Data, Apache Maven and H2 Database.
https://github.com/artysta/spring-simplest-rest-api-app

Last synced: 10 months ago
JSON representation

Pretty simple Spring REST API application using Spring Boot, Spring Data, Apache Maven and H2 Database.

Awesome Lists containing this project

README

          

# spring-simplest-rest-api-app

Pretty simple Spring REST API application using Spring Boot, Spring Data, Apache Maven and H2 Database.

Run app using:

./mvnw spring-boot:run

App should start at `localhost:8080`.

You can enter **database console** using `localhost:8080/console`. JDBC URL is `jdbc:h2:file:./usersDataBase`.

You can use **Postman** or another tool to test API.



METHOD
URL
DESCRIPTION


GET
/api/users/all
Returns all Users from the database.


GET
/api/users?id=1
Returns User with the specific - "1" in this example - id.


POST
/api/users
Adds User.


PUT
/api/users
Updates User.


DELETE
/api/users?id=1
Removes User with the specific - "1" in this example - id.