For building and running the application you need:
There are several ways to run a Spring Boot application on your local machine. One way is to execute the main
method in the com.caio.QuotesApplication
class from your IDE.
Alternatively you can use the Spring Boot Maven plugin like so:
mvn spring-boot:run
Info | Method | Path | Input | Output |
---|---|---|---|---|
Get all all Quotes | Get | /quotes | Array of Quotes | |
Get a Quote by id | Get | /quotes/{id} | A Quote | |
Get a random Quote | Get | /quotes/random | A Quote | |
Create a Quote | Post | /quotes | A quote payload | |
Delete a Quote | Delete | /quotes/{id} | ||
Delete all Quotes | Delete | /quotes |
Example of payload
Quote
{
"id": "1",
"author": "Charles Reade",
"text": "Example is contagious behavior.",
"date": "01/02/2003",
}