codeconsole commented on PR #16237:
URL: https://github.com/apache/grails-core/pull/16237#issuecomment-6301871105
@jdaugherty Thanks for round 4. The four notes are answered in their
threads. Since the approved head (a30f1d48bc) there are 18 commits, and several
change what round 4 verified, so they need a look before merge:
- **Problems.** `respond` no longer negotiates the type of a `ProblemDetail`
itself. It hands the problem to the return value handler of Spring MVC's
handler adapter (4223262ac3). So `ResponseBodyAdvice` beans scoped to the
controller and `ErrorResponse.Interceptor` beans apply, the status-mismatch
warning is Spring MVC's, and an `Accept` header Spring MVC cannot read fails
with its `HttpMediaTypeNotAcceptableException` for a status that is not an
error status, which its resolver answers with 406.
- Without `jackson-dataformat-xml`, a problem is written in JSON, and
`ProblemXml` and `ProblemBeans` are gone (6eb92d4045).
- `respond` takes an `ErrorResponse` (6711b33cc7), and web unit tests get
Spring MVC's handler adapter (eb33d5c098).
- **JSON.** With `grails.web.rendering.json.spring`, and for a
`jsonConfiguration`, `respond` writes through Spring MVC's
`RequestResponseBodyMethodProcessor`, so `ResponseBodyAdvice` applies to all of
it (713e9cecf8).
- This JSON is now UTF-8 and `application/json`, as Spring MVC writes it,
whatever `grails.converters.encoding` says.
- The prefix is read once per converter (c974ef9d70), fallbacks to the
legacy converter are reported per type and reason (b6a8045065), and binding
takes the mapper Spring MVC reads a `@RequestBody` with (20d80ce341).
- **Settings.** The keys and defaults of the new switches are in
`grails.config.Settings` (1fd9e1d73a).
- The guides now plan `grails.converters.json.legacy` to change in Grails
10 together with the other two JSON settings (932df60b6b), so that Grails 10
does not default to strict binding next to a lenient `request.JSON`. That
changes the release plan agreed in round 2, so please confirm it.
- **New opt-in, `grails.exceptionresolver.springHandlers`.** It is `false`
in Grails 9 and planned `true` in Grails 10. The `@ExceptionHandler` methods of
the controller and of the `@ControllerAdvice` beans scoped to it, Spring Boot's
`spring.mvc.problemdetails.enabled` handler among them, resolve the exceptions
actions throw, ahead of the Grails exception resolver (8ad6ea28f0).
- **Also:**
- localized title and detail of the validation problem (6f0e233cd5);
- null keys and key order of map associations as Jackson writes them
(c302ac4ae1);
- a test of the XML encoder's lookup of grails-xml (fc5c6e8f2e);
- a contract test that fails where Jackson adds a method the gated writers
do not forward (e30e151af7);
- the `spring-json-respond` example, which tests these end to end over
HTTP (085f56036b).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]