1 Replies Last post: Jul 1, 2013 3:32 PM by Sergey.Vasiliev  
Austin Vance Newbie 2 posts since
Jun 30, 2013
Currently Being Moderated

Jun 30, 2013 2:14 AM

"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


More Like This

  • Retrieving data ...