content: package com.example.demo;
  
  import org.springframework.context.annotation.ComponentScan;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.web.servlet.config.annotation.EnableWebMvc;
  import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
  import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
  import org.springframework.web.servlet.view.InternalResourceViewResolver;
  import org.springframework.web.servlet.view.JstlView;
  
  /**
   * @Created 22 / 05 / 2020 - 1:33 PM
   * @project SpringJSP
   * @Author Hamdamboy
   */
  
  @Configuration
  @EnableWebMvc
  @ComponentScan
  public class WebMvcConfiguration extends WebMvcConfigurerAdapter {
  
      @Override
      public void configureViewResolvers(ViewResolverRegistry registry) {
          InternalResourceViewResolver internalResourceViewResolver = new InternalResourceViewResolver();
          internalResourceViewResolver.setPrefix("/WEB-INF/view/");
          internalResourceViewResolver.setSuffix(".jsp");
          internalResourceViewResolver.setViewClass(JstlView.class);
          registry.viewResolver(internalResourceViewResolver);
      }
  }
  