Skip to content

DelegatingFilterProxy should be aware of FrameworkServlet's WebApplicationContext [SPR-13191] #17783

@spring-projects-issues

Description

@spring-projects-issues

Rob Winch opened SPR-13191 and commented

Status Quo

Currently Spring Security users are accustomed to configuring Spring Security in a root WAC (WebApplicationContext) and Spring MVC in the DispatcherServlet WAC.

This makes configuration unnecessarily complex in many situations (a parent / child context). For example, when users want to have method level security for a Spring MVC application it is unintuitive to them that they need to add a BeanPostProcessor to the DispatcherServlet WAC as well.

Proposal

To support a single WAC, it would be nice if DelegatingFilterProxy could fall back to looking in the DispatcherServlet WAC. This simplifies the configuration so that users don't need to specify the contextAttribute on the DelegatingFilterProxy which is difficult to remember the value for (i.e. org.springframework.web.servlet.FrameworkServlet.CONTEXT.dispatcher).


Referenced from: pull request #834, and commits 1fcd465

0 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions