Skip to content

AbstractAnnotationConfigDispatcherServletInitializer does not allow consolidating all configuration into the "root" context [SPR-11357] #15982

Closed
@spring-projects-issues

Description

@spring-projects-issues

Rossen Stoyanchev opened SPR-11357 and commented

For single servlet deployments, Spring configuration does not have to be split into "root" context configuration and "DispatcherServlet" configuration. When consolidating all configuration, it should be possible to do so in the "root" context (e.g. for application that use Spring Security).

In web.xml it's possible to leave the contextConfigLocation attribute of the DispatcherServlet empty and load all Spring configuration in the root context.

The AbstractAnnotationConfigDispatcherServletInitializer however prevents createServletApplicationContext from returning null.


Affects: 3.2.6, 4.0 GA

Issue Links:

Referenced from: commits ab5f125, 341d645, 5307a87, 21eb8db, 9845d9e

Backported to: 3.2.7

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions