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.
- Host: GitHub
- URL: https://github.com/artysta/spring-simplest-rest-api-app
- Owner: artysta
- License: mit
- Created: 2021-01-06T16:25:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-15T17:44:16.000Z (over 5 years ago)
- Last Synced: 2025-05-21T06:38:57.649Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.