@Override public ViewPreparer getPreparer(String name, Request context) { WebApplicationContext webApplicationContext = (WebApplicationContext) context.getContext("request").get( DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (webApplicationContext == null) { webApplicationContext = (WebApplicationContext) context.getContext("application").get( WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (webApplicationContext == null) { throw new IllegalStateException("No WebApplicationContext found: no ContextLoaderListener registered?"); } } return getPreparer(name, webApplicationContext); }
@Override public ViewPreparer getPreparer(String name, Request context) { WebApplicationContext webApplicationContext = (WebApplicationContext) context.getContext("request").get( DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (webApplicationContext == null) { webApplicationContext = (WebApplicationContext) context.getContext("application").get( WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (webApplicationContext == null) { throw new IllegalStateException("No WebApplicationContext found: no ContextLoaderListener registered?"); } } return getPreparer(name, webApplicationContext); }
public ViewPreparer getPreparer(String name, Request context) { WebApplicationContext webApplicationContext = (WebApplicationContext) context.getContext("request").get( DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (webApplicationContext == null) { webApplicationContext = (WebApplicationContext) context.getContext("application").get( WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (webApplicationContext == null) { throw new IllegalStateException("No WebApplicationContext found: no ContextLoaderListener registered?"); } } return getPreparer(name, webApplicationContext); }
@Override public ViewPreparer getPreparer(String name, Request context) { WebApplicationContext webApplicationContext = (WebApplicationContext) context.getContext("request").get( DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (webApplicationContext == null) { webApplicationContext = (WebApplicationContext) context.getContext("application").get( WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (webApplicationContext == null) { throw new IllegalStateException("No WebApplicationContext found: no ContextLoaderListener registered?"); } } return getPreparer(name, webApplicationContext); }