codeconsole commented on PR #13863: URL: https://github.com/apache/grails-core/pull/13863#issuecomment-4918278703
Thanks @jdaugherty (and Fabled) — both are spot on, and I've updated this PR to address them. Quick context on the diff: the original `@EnableWebMvc` removal already landed on `8.0.x` when #15916 merged this branch, so the diff GitHub renders here (computed against the old merge base) overstates what's actually new. I've merged current `8.0.x` back in and added the two follow-ups on top, so the real delta this PR now carries is just those fixes. **1. Undocumented `WebMvcAutoConfiguration` side effects — documented.** Added a new "31.3 Other Boot MVC features now active" subsection to the upgrade notes covering: - `OrderedFormContentFilter` (default-on via `spring.mvc.formcontent.filter.enabled`) — PUT/PATCH/DELETE form-encoded bodies now surface as request parameters. - `spring.mvc.*` / `spring.web.*` properties now taking effect (`spring.web.locale`, `spring.mvc.format.*`, `spring.web.resources.*`, …). - Boot's `/**` static-resource handler + `WelcomePageHandlerMapping`, and their effect on 404 / catch-all URL-mapping behavior (with the `spring.web.resources.add-mappings` opt-out). - `viewResolver` now `ContentNegotiatingViewResolver` for non-GSP apps (GSP unchanged). - `mvcConversionService` now `ApplicationConversionService`, plus Boot's message-converter customization. **2. `grailsWebRequest` double-registration — fixed.** Gated the raw `grailsWebRequest` bean on `@ConditionalOnMissingBean(value = GrailsWebRequestFilter.class, name = "grailsWebRequestFilter")`. When an application overrides only the registration bean, the raw filter now backs off with it rather than lingering unwrapped for Boot to auto-register on `/*` at `LOWEST_PRECEDENCE`. In the default case the raw bean stays a top-level `RequestContextFilter`, so Boot's own `RequestContextFilter` still backs off exactly as before. And you're right that the old override test only checked bean identity — I reworked it to assemble the real servlet chain via `ServletContextInitializerBeans` and assert against it: the override case verifies no stray `GrailsWebRequestFilter` lands on the chain, and the default case verifies exactly one does. Both new assertions fail without the gating fix (confirmed by reverting it). -- 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]
