You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying to add an endpoint to my Spring app for batch ingestion of CloudEvents, but CloudEventHttpMessageConverter isn’t playing nice. It won’t convert to List.
What I Did
Built a Spring Boot app.
Added a REST endpoint to accept a batch of CloudEvents.
Set up CloudEventHttpMessageConverter for the conversion.
Sent a batch of CloudEvents to the endpoint.
What I Expected
I expected the converter to turn the HTTP request into a List.
What’s Actually Happening
It’s not working. The converter is failing and throwing an error instead of doing the conversion.
@RestController
public class CloudEventController {
@PostMapping("/ingest")
public ResponseEntity<String> ingestBatch(@RequestBody List<CloudEvent> events) {
// Processing logic
return ResponseEntity.ok("Batch ingested successfully");
}
}
The text was updated successfully, but these errors were encountered:
I’m trying to add an endpoint to my Spring app for batch ingestion of CloudEvents, but CloudEventHttpMessageConverter isn’t playing nice. It won’t convert to List.
What I Did
Built a Spring Boot app.
Added a REST endpoint to accept a batch of CloudEvents.
Set up CloudEventHttpMessageConverter for the conversion.
Sent a batch of CloudEvents to the endpoint.
What I Expected
I expected the converter to turn the HTTP request into a List.
What’s Actually Happening
It’s not working. The converter is failing and throwing an error instead of doing the conversion.
The text was updated successfully, but these errors were encountered: