package com.hida.configuration;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
import org.springframework.web.servlet.view.JstlView;
import org.h2.server.web.WebServlet;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Acting as a dispatcher.xml, this class resolves requests into view names. 
 *
 * @author lruffin
 */
@Configuration
@ComponentScan(basePackages = "com.hida")
public class AppConfig {

    @Bean
    public ViewResolver viewResolver() {
        InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
        viewResolver.setViewClass(JstlView.class);
        viewResolver.setPrefix("/WEB-INF/views/");
        viewResolver.setSuffix(".jsp");
        return viewResolver;
    }
        
    @Bean
    ServletRegistrationBean h2servletRegistration(){
        ServletRegistrationBean registrationBean = new ServletRegistrationBean( new WebServlet());
        registrationBean.addUrlMappings("/console/*");
        return registrationBean;
    }
}

@@ -91,189 +91,8 @@
 an;%0A
-import org.springframework.web.servlet.ViewResolver;%0Aimport org.springframework.web.servlet.view.InternalResourceViewResolver;%0Aimport org.springframework.web.servlet.view.JstlView;%0A
 impo
@@ -507,333 +507,8 @@
  %7B%0A%0A
-    @Bean%0A    public ViewResolver viewResolver() %7B%0A        InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();%0A        viewResolver.setViewClass(JstlView.class);%0A        viewResolver.setPrefix(%22/WEB-INF/views/%22);%0A        viewResolver.setSuffix(%22.jsp%22);%0A        return viewResolver;%0A    %7D%0A        %0A
     

Add console endpoint