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
Copy file name to clipboardExpand all lines: docs/problem-detail.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Another widely accepted format is Problem Details, standardized by the IETF as [
7
7
8
8
Building on these industry standards, Spring 6 has introduced native support for ProblemDetails, making it easier for developers to adopt this consistent error format in their applications.
9
9
10
-
Let's take a closer look at the new [`ProblemDetail`](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/ProblemDetail.html) class that was introduced in Spring 6, which includes several fields defined by RFC9457:
10
+
Let's take a closer look at the new [`ProblemDetail`](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/ProblemDetail.html) class that was introduced in Spring 6, which is just a POJO and includes several fields defined by RFC 9457:
11
11
12
12
*`type` – A URI identifying the problem type
13
13
*`status` – The HTTP status code
@@ -46,7 +46,7 @@ When an exception is handled, the response is rendered with the content type `ap
46
46
"type": "http://example.com/apidoc/error/404",
47
47
"status": 404,
48
48
"title": "Post Not Found",
49
-
"detail": "Post is not found, the id: xxxx",
49
+
"detail": "Post is not found, the id: xxxx",
50
50
"instance": "/api/posts/xxxx"
51
51
}
52
52
```
@@ -67,7 +67,7 @@ Once enabled, you can use ProblemDetails as demonstrated above. Additionally, Sp
67
67
Before Spring 6, if you wanted to use Problem Details in your projects, you could consider using [`zalando/problem`](https://github.com/zalando/problem), which provides out-of-the-box [Spring Web integration](https://github.com/zalando/problem-spring-web) for both WebMvc and WebFlux stacks.
68
68
69
69
> [!NOTE]
70
-
> Zalando's Problem and Spring integration module offers deeper integration with Spring components than the current Spring Boot built-in support. It handles security exceptions and Jakarta Validation violations, among other features.
70
+
> Zalando's Problem and Spring integration module offers deeper integration with components in the Spring ecosystem than the current Spring Boot built-in Problem Details support. For example, it handles security exceptions and Jakarta Validation violations, among other features.
0 commit comments