"No view resolvers found" with annotation based config

I am using @Configuration classes instead of the traditional dispatcher-servlet.xml to configure a SpringMVC 3.2 application. In my @Configuration class I configure a view resolver like so

public class DispatcherModule {
  public InternalResourceViewResolver internalResourceViewResolver() {
    InternalResourceViewResolver resolver = new InternalResourceViewResolver();
    return resolver;

and then I register the @Configuration class with my WebApplicationInitializer

public class WebAppInitializer implements WebApplicationInitializer {
  public void onStartup(ServletContext container) {
    AnnotationConfigWebApplicationContext dispatcherContext = new AnnotationConfigWebApplicationContext();

    ServletRegistration.Dynamic dispatcher = container.addServlet("dispatcher", new DispatcherServlet(dispatcherContext));

Even though a view resolver is registered I still get the warning. Is there a way to either suppress the warning like I have done with the unused waring on my WebAppInitializer, or can I set Intellj to understand the view resolver.

Thank you

Please sign in to leave a comment.