Simple Spring boot demo that store name of a user with id
- Clone
- Run (using Maven)
mvn spring-boot:run
port 8080.
- URL:
/users
- Method:
GET
- Response: A list of all users.
- URL:
/users/{id}
- Method:
GET
- URL Params:
id=[integer]
- Response: The user with the specified ID.
- URL:
/users
- Method:
POST
- Data Params: JSON object representing the user.
{
"name": "[string]"
}
- Response: The created user.
- URL:
/users/{id}
- Method:
PUT
- URL Params:
id=[integer]
- Data Params: JSON object representing the user.
{
"name": "[string]"
}
- Response: The updated user.
- URL:
/users/{id}
- Method:
DELETE
- URL Params:
id=[integer]
- Response: No content.
This application user H2 in-memory database and ibatis sql mapping tool to communicate with it [!] database is volatile and stays in the memory itself