code: public static ContextLoaderListener createSpringContextLoader(final WebApplicationContext webApplicationContext) {
          return new ContextLoaderListener() {
              @SuppressWarnings("unchecked")
              @Override
              protected WebApplicationContext createWebApplicationContext(ServletContext sc) {
                  return webApplicationContext;
              }
          };
      }
docs: Creates a spring context loader listener
  
  @param webApplicationContext The web application context to use
  @return A context loader listener that can be used when starting jetty