Getting Started β’ API Endpoints β’ Contribute
A project that you can manage books and people.
To run the application you will need Java 17, Spring and if you want to test Docker you will have got to download it as well.
To run this application you will need to have in your application:
Cloning project with HTTPS
git clone https://github.com/notAvoiid/spring-boot.gitOr if you use SSH
git clone [email protected]:notAvoiid/spring-boot.gitThere's not Environment Variable in this application, but if you want to implement this you will need to enter at the application.yml and change it yourself like this:
spring:
datasource:
url: ${DATABASE_URL}
username: ${DATABASE_USERNAME}
password: ${DATABASE_PASSWORD}After cloning go to the folder downloaded and type:
cd rest-with-spring-boot-and-javaBuild the project using Maven:
mvn clean installIf it doesn't work try one of these
mvn clean package
mvn clean package -DskipTestsRun the Spring Boot Application
mvn spring-boot:runThe application will start on port: http://localhost:80 and http://localhost
Authentication β
| route | description |
|---|---|
| POST auth/signin | sign in an user signin |
| PUT auth/refresh/{username} | refresh user token refresh |
Books
| route | description |
|---|---|
| GET api/book/v1 | find all books find |
| GET api/book/v1/{id} | find a book by his ID findone |
| POST api/book/v1 | create a book create |
| PUT api/book/v1 | update a book update |
| DELETE api/book/v1/{id} | delete a book by his id delete |
People
| route | description |
|---|---|
| GET api/person/v1 | find all people find |
| GET api/person/v1/findPeopleByName/{firstName} | find all people by name find-by-name |
| GET api/person/v1/{id} | find a person by his ID findone |
| POST api/person/v1 | create a person create |
| PUT api/person/v1 | update a person update |
| PATCH api/person/v1/{id} | disable a person by his id disable |
| DELETE api/person/v1/{id} | delete a person by his id delete |
Files
| route | description |
|---|---|
| POST api/file/v1/uploadFile | upload a file |
| POST api/file/v1/uploadMultipleFiles | upload multiple files |
| GET api/file/v1/downloadFile/{filename:.+} | download a file |
REQUEST
{
"username": "[email protected]",
"password": "123456"
}RESPONSE
{
"token": "OwoMRHsaQwyAgVoc3OXmL1JhMVUYXGGBbCTK0GBgiYitwQwjf0gVoBmkbuyy0pSi"
}RESPONSE
{
"token": "OwoMRHsaQwyAgVoc3OXmL1JhMVUYXGGBbCTK0GBgiYitwQwjf0gVoBmkbuyy0pSi"
}RESPONSE
{
"id": "1",
"author": "igor",
"launchDate": "2024",
"price": "998",
"title": "My project"
}RESPONSE
{
"id": "1",
"author": "igor",
"launchDate": "2024",
"price": "998",
"title": "My project"
}REQUEST
{
"author": "igor",
"launchDate": "2024",
"price": "998",
"title": "My project"
}RESPONSE
{
"id": "1",
"author": "igor",
"launchDate": "2024",
"price": "998",
"title": "My project"
}REQUEST
{
"id": "1",
"author": "Igor Nascimento",
"launchDate": "2024",
"price": "998",
"title": "My project"
}RESPONSE
{
"id": "1",
"author": "Igor Nascimento",
"launchDate": "2024",
"price": "998",
"title": "My project"
}RESPONSE
{
"NO CONTENT"
}RESPONSE
{
"id": "1",
"firstName": "igor",
"lastName": "nascimento",
"address": "Street Albert Einstein",
"gender": "Male",
"enabled": true
}RESPONSE
{
"id": "1",
"firstName": "igor",
"lastName": "nascimento",
"address": "Street Albert Einstein",
"gender": "Male",
"enabled": true
}RESPONSE
{
"id": "1",
"firstName": "igor",
"lastName": "nascimento",
"address": "Street Albert Einstein",
"gender": "Male",
"enabled": true
}REQUEST
{
"firstName": "igor",
"lastName": "nascimento",
"address": "Street Albert Einstein",
"gender": "Male",
}RESPONSE
{
"id": "1",
"firstName": "igor",
"lastName": "nascimento",
"address": "Street Albert Einstein",
"gender": "Male",
"enabled": true
}REQUEST
{
"id": "1",
"firstName": "igor",
"lastName": "nascimento",
"address": "Street Albert Einstein 950",
"gender": "Male",
"enabled": true
}RESPONSE
{
"id": "1",
"firstName": "igor",
"lastName": "nascimento",
"address": "Street Albert Einstein 950",
"gender": "Male",
"enabled": true
}RESPONSE
{
"NO CONTENT"
}RESPONSE
{
"NO CONTENT"
}With the files endpoint you are gonna need to use the postman or insomnia to upload and download the archives.
To help me improve the project or to improve your own knowledge.
git clone https://github.com/notAvoiid/food-recipes.gitorgit clone [email protected]:notAvoiid/food-recipes.gitgit checkout -b feature/NAME(it creates your own branche)- Follow commit patterns
- Open a Pull Request explaining the problem solved or feature made, if exists, append screenshot of visual modifications and wait for the review!