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
- Host: GitHub
- URL: https://github.com/yoannfleurydev/hateoas-spring-boot
- Owner: yoannfleurydev
- Created: 2018-08-10T14:38:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-10T15:08:10.000Z (almost 7 years ago)
- Last Synced: 2025-01-26T08:45:56.317Z (4 months ago)
- Language: Java
- Size: 55.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.