sdk-java/examples/restful-ws-spring-boot
github-actions[bot] efdf0ba866
Bump to 4.1.0-SNAPSHOT (#645)
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: pierDipi <pierDipi@users.noreply.github.com>
2024-07-01 12:10:47 +02:00
..
src/main/java/io/cloudevents/examples/springboot Restful WS Spring boot example (#288) 2020-11-24 08:43:46 +01:00
README.md Fix curl command for Spring example (#478) 2023-01-02 13:36:30 +01:00
pom.xml Bump to 4.1.0-SNAPSHOT (#645) 2024-07-01 12:10:47 +02: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