Skip to content

ProblemDetail is missing serialization hints for Native Image #29801

Closed
@phejl

Description

@phejl

Spring AOT/Native Image:

  1. Use ResponseEntityExceptionHandler as a base class for your @ControllerAdvice
  2. Trigger BAD_REQUEST on your endpoint (for example sending empty POST, on endpoint with @RequestBody).
  3. Response returned is of content type Content-Type: application/problem+json with body {}

When you manually configure org.springframework.http.ProblemDetail for reflection the response body is {"type":"about:blank","title":"Bad Request","status":400,"detail":"Failed to read request","instance":"/your/endpoint"}

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)theme: aotAn issue related to Ahead-of-time processingtype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions