Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring MVC DispatcherServlet initialization parameter contextClass in documentation should implement ConfigurableWebApplicationContext not WebApplicationContext [SPR-17414] #21947

spring-issuemaster opened this issue Oct 19, 2018 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Oct 19, 2018

Sun Tao opened SPR-17414 and commented

In section 22.2.3 table 22.2, the explanation for contextClass Paramter is "Class that implements WebApplicationContext ..."

Web MVC framework

But when I see the source code of FrameworkServlet, the method createWebApplicationContext will throw exception if  ConfigurableWebApplicationContext is not a super class of contextClass. So is it better to say contextClass should implement ConfigurableWebApplicationContext?

Thank you.

Affects: 4.3.18

Referenced from: commits 448182f, 1c67ef4, c9f1016

Backported to: 5.0.11, 4.3.21

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Oct 22, 2018

Juergen Hoeller commented

Indeed, with the default context loading algorithm in FrameworkServlet / DispatcherServlet, the context class needs to implement ConfigurableWebApplicationContext. Only with a custom subclass of DispatcherServlet, other kinds of WebApplicationContext could be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.