package com.github.wreulicke.spring;

import javax.servlet.ServletContext;

import org.springframework.web.context.request.RequestContextListener;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class ApplicationInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {

  @Override
  protected Class<?>[] getRootConfigClasses() {
    return new Class[] {
      WebSocketConfig.class
    };
  }

  @Override
  protected Class<?>[] getServletConfigClasses() {
    return new Class[] {};
  }

  @Override
  protected String[] getServletMappings() {
    return new String[] {
      "/echo"
    };
  }
  @Override
  protected void registerContextLoaderListener(ServletContext servletContext) {
    super.registerContextLoaderListener(servletContext);
    servletContext.addListener(new RequestContextListener());
  }
}

@@ -35,117 +35,8 @@
 g;%0A%0A
-import javax.servlet.ServletContext;%0A%0Aimport org.springframework.web.context.request.RequestContextListener;%0A
 impo
@@ -564,221 +564,6 @@
   %7D%0A
-  @Override%0A  protected void registerContextLoaderListener(ServletContext servletContext) %7B%0A    super.registerContextLoaderListener(servletContext);%0A    servletContext.addListener(new RequestContextListener());%0A  %7D%0A
 %7D%0A

remove request scope