sdk-java/examples/restful-ws-spring-boot
Pierangelo Di Pilato a6580e5e1b
[2.2] Bump version to 2.2.2-SNAPSHOT (#440)
Run:
```
./mvnw versions:set -DnewVersion=2.2.2-SNAPSHOT -DgenerateBackupPoms=false -B
```

Signed-off-by: Pierangelo Di Pilato <pdipilat@redhat.com>
2021-12-21 13:15:56 +01:00
..
src/main/java/io/cloudevents/examples/springboot Restful WS Spring boot example (#288) 2020-11-24 08:43:46 +01:00
README.md Restful WS Spring boot example (#288) 2020-11-24 08:43:46 +01:00
pom.xml [2.2] Bump version to 2.2.2-SNAPSHOT (#440) 2021-12-21 13:15:56 +01:00

README.md

CloudEvents Restful WS + Spring Boot + Jersey example

This sample shows how to create a Spring Boot application that accepts CloudEvents and replies with CloudEvents.

To run it:

mvn spring-boot:run

You can try sending a request using curl:

curl -X POST -v -d '{"username": "slinkydeveloper", "firstName": "Francesco", "lastName": "Guardiani", "age": 23}' \                                                                                                                       ~
    -H'Content-type: application/json' \
    -H'Ce-id: 1' \
    -H'Ce-source: cloud-event-example' \
    -H'Ce-type: happybirthday.myapplication' \
    -H'Ce-specversion: 1.0' \
    http://localhost:8080/happy_birthday