- Gradle 8+
- Java 17+
./gradlew build
./gradlew bootRun
curl -X POST -H "X-User-Id: 1" -H "Content-Type: application/json" -d '{"text": "My first note"}' "http://localhost:8080/api/notes"
curl -H "X-User-Id: 1" "http://localhost:8080/api/notes"
curl -H "X-User-Id: 2" "http://localhost:8080/api/notes"
curl -H "X-User-Id: 1" "http://localhost:8080/api/notes/1"
curl -H "X-User-Id: 2" "http://localhost:8080/api/notes/1"
curl -X PUT -H "X-User-Id: 1" -H "Content-Type: application/json" -d '{"text": "My updated note"}' "http://localhost:8080/api/notes/1"
curl -X PUT -H "X-User-Id: 2" -H "Content-Type: application/json" -d '{"text": "My updated note"}' "http://localhost:8080/api/notes/1"
curl -X DELETE -H "X-User-Id: 2" "http://localhost:8080/api/notes/1"
curl -X DELETE -H "X-User-Id: 1" "http://localhost:8080/api/notes/1"