You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring MVC DispatcherServlet initialization parameter contextClass in documentation should implement ConfigurableWebApplicationContext not WebApplicationContext [SPR-17414] #21947
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?
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.
Spring MVC DispatcherServlet initialization parameter contextClass in documentation should implement ConfigurableWebApplicationContext not WebApplicationContext [SPR-17414] · Issue #21947 · spring-projects/spring-framework
Activity
spring-projects-issues commentedon Oct 22, 2018
Juergen Hoeller commented
Indeed, with the default context loading algorithm in
FrameworkServlet
/DispatcherServlet
, the context class needs to implementConfigurableWebApplicationContext
. Only with a custom subclass ofDispatcherServlet
, other kinds ofWebApplicationContext
could be used.