Description
Describe the bug
See spring-projects/spring-boot#29564 for details.
The recently introduced RequestMatcherDelegatingWebInvocationPrivilegeEvaluator
class creates a new FilterInvocation
in the getDelegate
method. This invocation has a DummyRequest
which cannot provide access to the ServletContext
. This means that Spring Boot's ApplicationContextRequestMatcher
cannot get the WebApplicationContext
.
This feels quite similar to #10208 which was fixed by making the WebInvocationPrivilegeEvaluator
ServletAware
.
To Reproduce
Run tests from the sample application at https://github.com/jeffbswope/null-servletcontext-errorpagefilter
Expected behavior
The tests should pass
Sample
https://github.com/jeffbswope/null-servletcontext-errorpagefilter