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

https://github.com/yoannfleurydev/hateoas-spring-boot

Small project using Spring Boot 2.0.4
https://github.com/yoannfleurydev/hateoas-spring-boot

Last synced: 2 months ago
JSON representation

Small project using Spring Boot 2.0.4

Awesome Lists containing this project

README

        

# HATEOAS Spring Boot

Small Spring Boot project based on Spring Boot 2.0.4 that probably include a bug
from Spring HATEOAS 0.25.0

## Configure

* Clone the repository.
* Create the database and the user.

```sql
CREATE DATABASE hateoas DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;

CREATE USER 'hateoas'@'localhost' IDENTIFIED BY 'hateoas';

GRANT ALL ON hateoas.* TO 'hateoas'@'localhost';
```

## Test the Web Service

* POST a contact (correct links):

```bash
curl --request POST \
--url http://localhost:8080/api/contacts \
--header 'content-type: application/json' \
--data '{
"firstName": "Recipient",
"lastName": "Recipient"
}'
```

* GET a contact (correct links):

```bash
curl --request GET \
--url http://localhost:8080/api/contacts/ \
--header 'content-type: application/json'
```

* GET a pagination of contacts (incorrect links):

```bash
curl --request GET \
--url http://localhost:8080/api/contacts \
--header 'content-type: application/json'
```

You can comment/uncomment the line in the `build.gradle` file to enable/disable
the bug. Be careful with cache, I usually remove the `.gradle` and the `build`
directories to fully check the bug.