Class ProblemDetail

java.lang.Object
org.springframework.http.ProblemDetail

public class ProblemDetail extends Object
Representation of an RFC 7807 problem detail, including all RFC-defined fields. For an extended response with more fields, create a subclass that exposes the additional fields.
Since:
6.0
Author:
Rossen Stoyanchev
See Also:
  • Constructor Details

    • ProblemDetail

      protected ProblemDetail(int rawStatusCode)
      Protected constructor for subclasses.

      To create a ProblemDetail instance, use static factory methods, forStatus(HttpStatusCode) or forStatus(int).

      Parameters:
      rawStatusCode - the response status to use
    • ProblemDetail

      protected ProblemDetail(ProblemDetail other)
      Copy constructor that could be used from a subclass to re-create a ProblemDetail in order to extend it with more fields.
    • ProblemDetail

      protected ProblemDetail()
      For deserialization.
  • Method Details