Skip to content

Commit 04f0f1d

Browse files
committed
Update table of supported controller method return types
See gh-27052
1 parent bba6642 commit 04f0f1d

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

src/docs/asciidoc/web/webflux.adoc

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1967,6 +1967,14 @@ generally supported for all return values.
19671967
| `HttpHeaders`
19681968
| For returning a response with headers and no body.
19691969

1970+
| `ErrorResponse`
1971+
| To render an RFC 7807 error response with details in the body,
1972+
see <<webflux-ann-rest-exceptions>>
1973+
1974+
| `ProblemDetail`
1975+
| To render an RFC 7807 error response with details in the body,
1976+
see <<webflux-ann-rest-exceptions>>
1977+
19701978
| `String`
19711979
| A view name to be resolved with `ViewResolver` instances and used together with the implicit
19721980
model -- determined through command objects and `@ModelAttribute` methods. The handler
@@ -3350,7 +3358,7 @@ include::web-data-binding-model-design.adoc[]
33503358

33513359

33523360
[[webflux-ann-controller-exceptions]]
3353-
=== Managing Exceptions
3361+
=== Exceptions
33543362
[.small]#<<web.adoc#mvc-ann-exceptionhandler, Web MVC>>#
33553363

33563364
`@Controller` and <<webflux-ann-controller-advice, @ControllerAdvice>> classes can have
@@ -3411,6 +3419,23 @@ for more detail.
34113419

34123420

34133421

3422+
[[webflux-ann-exceptionhandler-args]]
3423+
==== Method Arguments
3424+
[.small]#<<web.adoc#mvc-ann-exceptionhandler-args, Web MVC>>#
3425+
3426+
`@ExceptionHandler` methods support the same <<webflux-ann-arguments,method arguments>>
3427+
as `@RequestMapping` methods, except the request body might have been consumed already.
3428+
3429+
3430+
3431+
[[webflux-ann-exceptionhandler-return-values]]
3432+
==== Return Values
3433+
[.small]#<<web.adoc#mvc-ann-exceptionhandler-return-values, Web MVC>>#
3434+
3435+
`@ExceptionHandler` methods support the same <<webflux-ann-return-types,return values>>
3436+
as `@RequestMapping` methods.
3437+
3438+
34143439

34153440
[[webflux-ann-controller-advice]]
34163441
=== Controller Advice

src/docs/asciidoc/web/webmvc.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,6 +2215,14 @@ supported for all return values.
22152215
| `HttpHeaders`
22162216
| For returning a response with headers and no body.
22172217

2218+
| `ErrorResponse`
2219+
| To render an RFC 7807 error response with details in the body,
2220+
see <<mvc-ann-rest-exceptions>>
2221+
2222+
| `ProblemDetail`
2223+
| To render an RFC 7807 error response with details in the body,
2224+
see <<mvc-ann-rest-exceptions>>
2225+
22182226
| `String`
22192227
| A view name to be resolved with `ViewResolver` implementations and used together with the implicit
22202228
model -- determined through command objects and `@ModelAttribute` methods. The handler
@@ -3898,6 +3906,7 @@ level, <<mvc-exceptionhandlers, HandlerExceptionResolver>> mechanism.
38983906

38993907
[[mvc-ann-exceptionhandler-args]]
39003908
==== Method Arguments
3909+
[.small]#<<webflux.adoc#webflux-ann-exceptionhandler-args, WebFlux>>#
39013910

39023911
`@ExceptionHandler` methods support the following arguments:
39033912

@@ -3962,6 +3971,7 @@ level, <<mvc-exceptionhandlers, HandlerExceptionResolver>> mechanism.
39623971

39633972
[[mvc-ann-exceptionhandler-return-values]]
39643973
==== Return Values
3974+
[.small]#<<webflux.adoc#webflux-ann-exceptionhandler-return-values, WebFlux>>#
39653975

39663976
`@ExceptionHandler` methods support the following return values:
39673977

@@ -3978,6 +3988,14 @@ level, <<mvc-exceptionhandlers, HandlerExceptionResolver>> mechanism.
39783988
be converted through `HttpMessageConverter` instances and written to the response.
39793989
See <<mvc-ann-responseentity>>.
39803990

3991+
| `ErrorResponse`
3992+
| To render an RFC 7807 error response with details in the body,
3993+
see <<mvc-ann-rest-exceptions>>
3994+
3995+
| `ProblemDetail`
3996+
| To render an RFC 7807 error response with details in the body,
3997+
see <<mvc-ann-rest-exceptions>>
3998+
39813999
| `String`
39824000
| A view name to be resolved with `ViewResolver` implementations and used together with the
39834001
implicit model -- determined through command objects and `@ModelAttribute` methods.

0 commit comments

Comments
 (0)